Skip to content

[Bug] MSAL should not attempt to validate the ID Token #656

@bgavrilMS

Description

@bgavrilMS

Describe the bug

WSL + Azure CLI uses MSAL for auth in a public client scenario.
Upon receiving an ID Token, MSAL validates it and fails due to invalid nbf with error "The ID token is not yet valid"

Root cause

Looks like MSAL Py tries to validate the id token as follows:

However, due to a clock skew, MSAL Py raises an error.

Clients should not validate the id token's nbf and exp claim. In case of access tokens, the STS returns an expiry duration in the token response to help clients cache the access tokens correctly.

At a minimum remove nbf and exp validation.
Ideally remove all token validation logic - other MSALs do not perform this and rely on having had an SSL connection with the token issuer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions