Skip to content

Release 5.14.0

Latest

Choose a tag to compare

@Koosha-Owji Koosha-Owji released this 26 Nov 05:50
· 4 commits to main since this release
4730bd1

v5.14.0

Step-up authentication

Ask a signed-in user for a stronger or more recent sign-in before a sensitive action.

const { hasAuthenticationContext, stepUp } = useKindeAuth();

const requirement = { acr: "mfa", maxAge: 300 } as const;
if (!(await hasAuthenticationContext(requirement))) {
  await stepUp(requirement);
}
  • New hook methods: stepUp, getAuthenticationContext, hasAuthenticationContext, isStepUpSupported, handleStepUpChallenge.
  • ProtectedRoute accepts acr and maxAge.
  • New <StepUpLink> component.
  • login() and register() accept acrValues and maxAge.
  • Your Kinde environment must support step-up for acr. Check with isStepUpSupported().
  • For handleStepUpChallenge, your API must send Access-Control-Expose-Headers: WWW-Authenticate.

See Step-up authentication in the README for details.

Changes

  • login() URL errors now go to onError as ERR_LOGIN instead of rejecting.
  • unmet_authentication_requirements and login_required callback errors now reach onError, with a new cause field.
  • @kinde/js-utils updated to 0.33.0.

Full changelog: v5.13.2...v5.14.0