Answer the question
In order to leave comments, you need to log in
How to properly organize authorization on the API server?
I am writing an API for a service whose clients will be mobile applications (my own + third-party). For my applications, I use the Resource Owner Password Credentials Grant from the official oAuth 2.0 documentation.
Those. a standard registration form is made in the application (enter email, password), then sent to the server (POST /users), where a user account is created. Next, an endpoint like /auth is sent:
grant_type=password
username=Mike
password=123
client_id=123
client_secret=123
social_provider=facebook
social_token=ТОКЕН_ФЕЙСБУКА
grant_type=password
username=facebook_user
password=ТОКЕН_ФЕЙСБУКА
client_id=123
client_secret=123
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question