How to use JWT without user and login?

2019-07-16 20:32发布

问题:

I'm making a simple file converter API in Node.js and I'm looking to avoid abuse in requests. So I'm looking for a way to use JWT without userModel, login etc.

But I can't thing something online.

Thank you

回答1:

we don't need a user or login to create JWT, we can generate a token with any kind of data. Simple just generate a token then pass it to the client after that on file convert request verify the token.

I found similar topic that might help you click here