In some of my tests I need to identify the user in terms of my application. For us this means, extracting a custom claim we place in the user’s metadata with a rule.
Right now my tests authenticate by requesting access token form “.us.auth0.com/oauth/token”, providing my client id and secret. This works for general tests that only validate a user is authenticated.
Maybe I missed something in the documentation, but I’ve not been able to figure out a way to authenticate AS a given user. I wouldn’t mind doing what is suggested in this questions but I don’t know how I would then specify which user to authenticate with.
Another option that would work for me is being able to create a valid token, and also attach that custom claim I put using rule. Is there a way for me to authenticate and add custom claims using the API?