I’m looking for ways on how to authenticate web app for cypress test. The application only has passwordless authentication enabled. Any help is appreciated. Thanks!
Hi @mohsin_poc,
Welcome to the Auth0 Community!
You could use the Authorization Code Flow to authenticate your web app with passwordless.
Let me know if you have any questions.
Cheers,
Rueben
Thanks @rueben.tiow. Can you expand on how a Authorization code flow would help here if the client is SPA?
Hi @mohsin_poc,
If the client is a SPA, then you must use the Authorization Code Flow with PKCE.
Thanks,
Rueben
@rueben.tiow just making sure i understand the solution. I setup a dummy app in auth0 with passwordless with email code.
When i hit the /authorize
endpoint document in Authorization code flow. I’m presented with login screen. Entering the email would send a code to the email box. Now this is a problem, cypress does not have access to email box. what is the work around?
Hi @mohsin_poc,
Thanks for the update.
You might be able to work around this by configuring a Test SMTP Email Server to capture and retrieve test emails from the passwordless login.
Thanks,
Rueben