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 User
object. You will need to store the token in a session store or on the client side to send it in the future requests.