Answer the question
In order to leave comments, you need to log in
Secure authorization in an API-based application?
I make an application and first of all I develop an API. Stopped at authorization. How to make it safe?
In my understanding, it looks like this now:
1. We turn to the method with a login and password ( /auth/login/[email protected]&password=123456 )
2. The server checks the data and, if successful, generates and returns a token, which is written in cookies.
3. With this token, we later turn to other API methods.
Well, in general, everything ... But it all looks somehow not very safe. Just enough to know this token and you can use someone else's accounts.
So what's the best way to do it?
By the way, I use the PHP Slim Framework
Answer the question
In order to leave comments, you need to log in
Install SSL for better security. For example: StartSSL - free
Use POST instead of Get. I read somewhere that it is safer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question