Auth0-spa-js: Invalid algorithm error

Created on 26 Jun 2019  ·  6Comments  ·  Source: auth0/auth0-spa-js

Hi, I've just tried to run react login example from github with my domain and clientId and receive the following error.
image

Do you know how it can be fixed?

Most helpful comment

This library only supports RS256 tokens. Can you check your application and make sure you're using RS256 tokens instead of HS256?

This can be configured in the advanced settings in your application page:

image

All 6 comments

This library only supports RS256 tokens. Can you check your application and make sure you're using RS256 tokens instead of HS256?

This can be configured in the advanced settings in your application page:

image

That worked.

But it would be very welcome to have this crucial piece of information on this tutorial QuickStart page 😉

@Tazaf Thanks for the feedback! We're adding a FAQ section in our QuickStarts and this will definitely will be there!

Oh my god I tripped over this so badly my face still hurts.

Applications default algorithm is HS256 and nowhere in the quickstart guide is telling you to switch it to RS256.

You guys should def update it.

@alfonmga are you talking about a new client you created in the Auth0 dashboard? Or are you trying to migrate an old application to the new SDK? In any case, I'll send a PR to add this information in the Quick Start as well. Thanks for the feedback!

When I was following along with the quickstart, it was just failing silently and I didn't catch the error until I tried using promises instead of async await. I agree it would be helpful to include a note in the quickstart to check our token settings.

Was this page helpful?
0 / 5 - 0 ratings