Auth0 Home Blog Docs

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.

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!