guardian / gateway

🕵️🆔👤The platform for authentication at (profile.)theguardian.com
https://profile.theguardian.com
12 stars 1 forks source link

Passwordless | `ResetPasswordEmailSentPage` and API refactors #2881

Closed coldlink closed 1 month ago

coldlink commented 1 month ago

What does this change?

export const validateChallengeAnswerRemediation = validateRemediation<
    ChallengeAnswerResponse,
    ChallengeAnswerRemediationNames
>;

instead of

export const validateChallengeAnswerRemediation = (
    challengeAnswerResponse: ChallengeAnswerResponse,
    remediationName: ChallengeAnswerRemediationNames,
) => {
    const hasRemediation = challengeAnswerResponse.remediation.value.some(
        ({ name }) => name === remediationName,
    );

    if (!hasRemediation) {
        throw new OAuthError(
            {
                error: 'invalid_request',
                error_description: `Remediation ${remediationName} not found in challenge/answer response`,
            },
            400,
        );
    }
};
github-actions[bot] commented 1 month ago

Deploy build 9925 of identity:identity-gateway to CODE

All deployment options - [Deploy build 9925 of `identity:identity-gateway` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=identity%3Aidentity-gateway&build=9925&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 9925 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=identity%3Aidentity-gateway&build=9925&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=identity%3Aidentity-gateway&stage=CODE)

From guardian/actions-riff-raff.