i'm using graphcool with auth0 and getting a gener...
# prisma-whats-new
a
i'm using graphcool with auth0 and getting a generic
invalid token specified
error when trying to create a new user (createUser mutation). how can i debug this more thoroughly?
n
@adamibaker hey, how do you obtain the token?
a
it's a react-native app; the token is obtained from auth0 via an event. the pattern is that a web browser pops up with the auth0 login UI; the token is obtained there.
the tokens appear to decode correctly; and this code worked a few weeks ago
n
Is that obtained via Auth0 lock then?
a
i'm not using lock
n
Ok. Then probably
auth0-js
? We currently only support v7 and not v8, more specifically we only support HS256 encoded tokens and not RS256
a
did anything change in the past few weeks?
n
no
a
hmmm … strange
n
but you might have updated your version from 7 to 8?
a
not that i'm aware of
but i'll dig in
n
could you try to generate a new client secret in your Auth0 client and double check that everything matches up?
a
i generated a new client secret in the auth0 control panel; how do i change it on the graphcool side? i can't see anywhere in the UI to do so
n
you need to click the Auth0 integration card in the integration view
a
yea i did that
OH
ok i didn't see that the field is editable
ok it looks updated, let me try again
n
hmm so did you change that or what happened?
ahh gotcha
(side note: I just created this issue https://github.com/graphcool/ui-feedback/issues/29)
a
same generic error
"Invalid token specified"
nothing has changed on my end as far as i can tell; i'm not even using an auth0 library. i haven't changed any code.
what's the best way for me to validate that the token i have is appropriate for graphcool/acceptable?
n
you can go to jwt.io, provide the token and the secret
a
ok, it looks fine
the encoded token + my new secret produces the result:
Signature Verified
i'm only getting the error when trying to
createUser
with graphcool
the signature is encoded HS256
ok — i discovered a totally unrelated bug in my code (as one does) — i was sending bad data as my encoded token. sorry to bother you
n
oki! no worries 🙂
you can look into the Authorization header of the requests to make sure what is being send next time