Ready to post? First, try searching for your answer.
I’ve been implementing an app which uses the Organizations feature, which requires that the Username-Password grant be disabled. However, all of the guidance around having an automated integration or E2E test authenticate involves using this grant. (example here: End-to-End Testing with Cypress and Auth0)
I have a bunch of existing integration and E2E tests which until now have used Username-Password grant to authenticate. Now that I am using the organizations feature in Auth0, I need a new way to get access tokens for these users from within my test script.
My tests involve verifying that users with certain roles can/cannot perform certain actions, so it is necessary for me to have different identities with a variety of permissions. I tried using a client credentials grant to get a M2M token, but there is no way I can control the specific roles on this client.
Is there a way I can programmatically authenticate a user to an application when organizations is enabled (and Username-Password grant is disabled as a result?)
(PS. If it is relevant, e2e tests are written in cypress and integration tests using jest)