Skip to content

Short max_age can trigger re-auth, but also results in short lived token. How do we get tokens for longer time? #444

@raqsilva

Description

@raqsilva

Hello,

This regards to the new feature of maximum authentication age (max_age) when initiating the auth flow (initiate_auth_code_flow) for a confidential client application.

We are expecting the user to be forced to re-authenticate if they haven't done that after max_age seconds. This part works perfectly fine, if we set the max_age to 0 seconds it will prompt the re-auth right away and if we set to 120 secs it will only prompt the re-auth if the user have not authenticated in the past 120 secs plus.

Although, if we set max_age to any value, this will also change the "exp" claim of our token. Which means if we take just a bit longer on our authentication flow, the token will be expired by then...

The expiration claim should be defined always by our azure application and not by our msal flow, we should only be able to control re-auth and not token expiry date.

msal version = 1.16.0
python version = 3.8.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions