Trying to pinpoint where some errors are coming fr...
# prisma-whats-new
c
Trying to pinpoint where some errors are coming from (auth0 or graph.cool), but it would be helpful to know if anyone our there has actually done this.
n
@cartogram hey our Auth0 integration currently only works with HS256 encoded tokens and not with RS256 ones
you can change the settings of your Auth0 client to use the HS256 algorithm
c
Right, I discovered that one already, do you know if the token contains more than just a scope of
openid
, will it fail on GC's end?
I am currently up against this error, https://github.com/auth0/auth0.js/issues/391, and wondering if it is the cause of a token error with Graph cool or if it is something else.
n
hmm I don't understand that one. can you describe what you want to do?
c
I just want to login using a the response form the auth0-js library, not the lock.
but when i send the token response from the webAuth.login method, GC says the token is invalid.
n
hmm the issue describes another topic, how are the two related?
c
If I replace the token in local storage with one received from Lock, it works, so I am wondering what is invalid about the token received from auth-js
n
could you verify the token manually on jwt.io?
I've seen issues where the obtained token is still RS256 under certain circumstances, even though the client setting is HS256
c
The issue i posted is describing the scope value in the auth0-js library not working. This is related because the scope impacts the size of the token and could possibly be why GC throws an error.
Yeah I got that one already, even with Lock, if you have HS256, it gives the same token invalid error.
I can get a successful token via Lock, I am wondering why I can't with auth0-js
I'll do a test with jwt.io
OK got invalid signature
n
soo do you use multiple clients?
c
no, just a web app
apollo
n
I mean multiple Auth0 clients
did you double check that you are pasting the correct client secret to jwt.io?You can copy it from Your Auth0 client settings
c
yeah
which would make sense with what you are saying, the token generated from auth0-js is coming up as RS256 on jwt.io
https://auth0.com/forum/t/not-able-to-set-signing-algorithm-to-hs256/5432/4 basically, if its a brower-based application (mine is) use v7
otherwise you will be stuck with RS256
n
right. Is that an option for you?
c
Yeah thats fine, I'm more familiar with v7 anyways, but before I refactor, What is the likely-hood of GC supporting RS256 in the future?
n
we will support it pretty certainly, but it will take some time 🙂 I think switching now to v7 is justified
c
Alright, thanks Nilan! Glad to have gotten to the bottom of it.
n
👍 glad to be of help
c
Hey @nilan just fyi, I'm using v7 of auth0-js, and it worked as expected. You may want to let any other poor souls know not to use v8 with graph.cool.
also new schema dashboard is 👌
n
awesome! 🙂