Skip to content

How verify token and store secret ? #211

Answered by panva
innovaweb-dev asked this question in Q&A
Discussion options

You must be logged in to vote

I try to verify access token, but does not work

Well, why are you verifying with a new random secret? Of course the signature validation is going to fail. Use the same secret for signing and verifying. Store the secret through whatever means fits your deployment. The secret can be passed in as a Buffer or a KeyObject instance, both of which have APIs to (de)serialize the random value and come as standard APIs in Node.js

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by innovaweb-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants