1 year ago

Generating guest tokens

Posted 1 year ago by winner1

I'm using passport on my project

I want to make some specific routes accessible for all of my API users without using username and password to take an access token

the reason is that some routes like reading a table records should be usable for all of my android application users to load posts and ... without registering(tell me if this is not the best way to make that possible!)

lets suppose user can use this endpoint to obtain a guest access token:

and result should be something like:


after that, user can access guest-allowed routes

do you have any idea that which method should I use?

I also checked this question but I'm not so familiar to jwt:

thanks in advance

Please sign in or create an account to participate in this conversation.