Skip to content

Disable nonce validation for id token for e2e tests #561

@xiananfan

Description

@xiananfan

Hi,

I am trying to setup e2e tests for login. Instead of actually go through the login dialog, I am trying to use "resource owner password" grant type to get the access token and id token. However, the id token got using password grant type does not contain "nonce" as one of the claims in the JWT.

In the code here, it will fail the id token validation, and won't store the id token in the local storage.

In the "LoginOptions", there is a "disableOauth2StateCheck" flag, but this flag does not turn off nonce check. Is it possible to add a similar flag to disable nonce check for e2e tests only?

Reference: https://auth0.com/blog/end-to-end-testing-with-cypress-and-auth0/

Thanks,
Xianan

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigation-neededIndication that the maintainer or involved community members may need to investigate more.password-flowIssues specific to the (Resource Owner) Password flowpr-welcomeWe'd welcome a PR to solve the issue.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions