Announcing the General Availability of the Auth0 SPA JS SDK

Not be able to use cypress with an auth0-spa-js project is very a blocking point! Please try to fix asap.

3 Likes

Hey there @matinfo!

Thanks for reporting that. Would you mind sharing more context around it? What are you trying to build with that , etc. ? Thank you!

1 Like

A post was merged into an existing topic: End-to-End Testing with Cypress and Auth0

Any update on a tutorial for Auth0-SPA integration with Cypress? We upgraded last week and Cypress can no longer login to test. Please refer me to any material that you guys have available. Thank you

1 Like

Hey there @fmozaffari!

Nothing visible on the front at least for me. Iā€™ll tag @sam.julien as heā€™s the author of the core article of that thread maybe he know something more on that.

Hey @fmozaffari! Iā€™m chatting with the SDK team ā€“ can you give me a better idea on what kinds of issues youā€™re facing?

Hey Sam! As it happens, Iā€™ve run into issues using this SDK and getting Cypress to log in without rerouting back to name.auth0.com/u/login?state=_____. Iā€™ve gotten the logging in to work, but I canā€™t run any UI assertions on my web app routes since the auth client thinks weā€™re not logged in.

Refused to display 'https://<custom_domain>.com/u/login?state=_____' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'".

For context, I have followed the Vue quickstart guide and have a working login implementation for my company to experiment with.

1 Like

Thanks for providing that context @DougW!

1 Like

Hello, Can auth0-spa-js-sdk used in an electron app?

Donā€™t have much of experience with Electron but it is aimed for SPAs (Single Page Applications) @neevany

Hi @DougW,

Relayed your last message to the SDK team and hereā€™s their response:

If thatā€™s the error theyā€™re getting, Iā€™m not sure thereā€™s any way around it. I hit something similar today when trying to do some integration testing with the SDK. I was able to log in ok but as soon as I instigated a flow where I had to give consent (adding scopes, for example) I got the same error and couldnā€™t progress.

The error makes sense, means that bots canā€™t give consent on behalf of the user. Thereā€™s no way to change it on the client as far as I know.

Having said that, itā€™s interesting that the app thinks theyā€™re not logged in. Are they navigating through their site by hitting URLs, or by clicking buttons? If theyā€™re clicking buttons then the Vue router should do the navigation without refreshing the page. If theyā€™re navigating to specific URLs, then that would mean that the app would need a little time to restore their session as it would have to reinitialize the SDK client every time.

Hope that helps!

Cheers,
Sam Julien

1 Like

Thanks Sam for cross-posting it here!

Iā€™m also interested in how to use cypress testing with auth0-spa-js. Do you have an update on this @konrad.sopala?

1 Like

Unfortunately we donā€™t have any content on this as of now.

1 Like

I am still searching for an elegant solution to get auth0 to work with cypress. Nothing being stored in localstorage (i.e. cacheLocation: ā€˜localstorageā€™). Any update on this?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.