Auth0 Home Blog Docs

Bad Algorithm Rejection with quickstart 03 -- jQuery calling an API



I pulled down the “Calling an API” example for jQuery, installed it and started it running.

The main page comes up fine but I get an “invalid token” caused by an algorithm snafu. Everything seems to be configured for RS256, but I get this error:

Object {error: “invalid_token”,
errorDescription: “Algorithm HS256 is
not supported. (Expected algs:
"Algorithm HS256 is not supported.
(Expected algs: [RS256])"proto:
Any suggestions would be appreciated.


Hi @pwayner

You can choose RS256 as the algorithm for your client in the settings.

In the settings for your client, choose Show Advanced Settings > OAuth and choose RS256.


Thanks. That made it possible to log in. Now I’m getting an “insufficient scope” error with a 401. If you have any clues on how to solve that, you know where to find me.


Have you created an API in the dashboard and also created a scope of “read:messages” for it? That’s what the sample uses. Be sure to follow the steps outlined in the quickstart.