feat(auth): add post-Fayda password setup flow

This commit is contained in:
Abubeker Yasin
2026-06-26 14:20:32 +03:00
parent 84a14b7312
commit 9c664ccce6
8 changed files with 286 additions and 15 deletions

View File

@@ -66,7 +66,9 @@ function decodePrivateJwk(base64: string): FaydaJwk {
export default registerAs('fayda', (): FaydaConfig => {
const enabled = (process.env.FAYDA_ENABLED ?? 'false').toLowerCase() === 'true';
const scope = process.env.FAYDA_SCOPE ?? 'openid profile email';
// `profile` covers name/birthdate/gender/picture; `email`, `phone`, `address`
// are needed so the matching essential claims aren't rejected as out-of-scope.
const scope = process.env.FAYDA_SCOPE ?? 'openid profile email phone address';
const acrValues = process.env.FAYDA_ACR_VALUES ?? 'mosip:idp:acr:generated-code';
const claimsLocales = process.env.FAYDA_CLAIMS_LOCALES ?? 'en am';
const sessionTtl = Number.parseInt(process.env.FAYDA_SESSION_TTL_MINUTES ?? '10', 10);