delight-im / PHP-Auth

Authentication for PHP. Simple, lightweight and secure.
MIT License
1.08k stars 234 forks source link

Use PHPAuth for a REST API ? #291

Open Lorian-tation opened 1 year ago

Lorian-tation commented 1 year ago

Is there a way to create a JWT on login and store it in the database to get it on the login request ? (and disable all Sessions & Cookies creation ?) I'm trying to build a REST API with a secure authentification system :D

ocram commented 1 year ago

Thanks, that would indeed be a good additional use case. But right now, it’s not possible yet, unfortunately. Anyway, there’s no reason to think we couldn’t redesign this library to make sessions and cookies optional and allow for usage with JWTs instead.