Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passwordless | Reset password with passcodes handle case for non-existent users #2915

Merged
merged 3 commits into from
Sep 25, 2024

Commits on Sep 24, 2024

  1. Configuration menu
    Copy the full SHA
    960f295 View commit details
    Browse the repository at this point in the history
  2. refactor(EncryptedState): validate and modify stateHandle, remove `…

    …undefined` values
    
    The `EncryptedState` cookie gets quite large due to the nature of encryption and addition verification tags and signing.
    
    In order to reduce the size of the cookie we set we have done two things.
    
    1. For the Okta IDX API, it turns out we only need the first part of the `stateHandle` to persist. The API continues to work with just this bit.
      - The `stateHandle` string is 817 characters long, however only the first part before the `~` is needed, which is just 46 characters in length.
      - This is actually the same bit that is required for the `stateToken` parameter in the `/login/token/redirect` endpoint used after authentication
        - see: https://github.com/guardian/gateway/blob/34311cdf8524f247a11841fbf7bdf9568f5829ea/src/server/lib/okta/idx/shared/idxFetch.ts#L128
    2. We remove `undefined` keys and values, this means we dont have to persist the key and undefined value in the encrypted JSON, thus saving space.
    coldlink committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    de7e71f View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    2edf804 View commit details
    Browse the repository at this point in the history