I am working on a project on which I authenticate my users on a front-end (authorization code with PKCE) . Then, I am sending to my back-end the id token in order to check the authentication and return some informations (if the authentication is successful).
In order to do automated tests (integrated on my CI), I would like to know if there is an method to fetch an id token from a test user.
I tried a first approach by :
- creating a auth0 tenant specific for test purposes
- creating one user
- fetch token with the endpoint oauth/token with the password authorization flow.
Nevertheless the endpoint doesn’t look to be able to return an id token, only access token. (according to the API documentation)
Can you recommend a way to fetch automatically an id token and then test my API routes ?
I thank you a lot in advance,