Home > Net >  How do I get a user object from a jwt token in surrealdb?
How do I get a user object from a jwt token in surrealdb?

Time:10-09

I have a jwt token returned by surrealdb's signin() method.

How do I populate a user object on authenticated requests using this token?

CodePudding user response:

You can't get user data from the token but you should use the user's provided details to create a Userobject. You will need to store the token in a session store or on the client side to send it in the future requests.

  • Related