Secure way to store users API token [closed]

  laravel, php, security, token

I’m making an API that uses API Tokens to get used by the user to interact with my service. I don’t want to use OAuth 2 for this at the moment because it’s a simple service (MVP) and the tokens will have a long time life (and can be regenerated).

I was thinking on using Bcrypt to hash it and store, but the max length is 56 characters and currently my tokens are 140 char.

It’s secure enough a 56 char length API token? or exist an alternative to Bcrypt that I can implement in Laravel/PHP?

Source: Laravel

Leave a Reply