5

token auth woes

I am fed up of doing shitty token authentications that don't refresh and are database dependent. what's the good way to do token auth for rest APIs? json-web-token?

Comments
  • 0
    when you say database dependent do you mean that you want a solution that does not involve database in general or rdbms or even nosql for that matter
  • 0
    I think, like you mentioned, JSON web tokens can definitely be a good alternative in this case. I've used for a few small projects and haven't had any issues. Certainly not an expert on them, but I haven't seen much downside. The only I can really think of is if you like analyzing token usage/patterns on the server-side, but not sure how common that is.
  • 0
    JWT is a good option but the reason database tokens are more common is they offer more control.
Add Comment