Answer the question
In order to leave comments, you need to log in
What is the authentication mechanism when writing an API?
First time writing API backend using OAuth2.0.
I already dealt with OAuth (wrote clients for vk), but only from the client side.
The question arose, how to organize authentication (not authorization) when working with OAuth?
Those. for example: there is an API client that has a login-password entry form, the user of this client drives in his data, clicks "Login", but I don't quite understand what's next. I understand that the request goes to the server, it checks the data, if they are correct and there is such a user, then what should he do? And how in the future should the client “tell” the server that this is a user and how should the server understand that he has already been authenticated?
I tried to search for information on the Internet, I saw several articles that prompted certain thoughts, but the whole mechanism is still not fully understood.
Answer the question
In order to leave comments, you need to log in
and here's what I don't quite understandif the login/password is correct, you return an access token, if not, an error message. Everything is written in the documentation with examples (and it seems there was a Russian fork of the documentation).
Those. for example: there is an API client that has a login-password entry form, the user of this client drives in his data, clicks "Login", but I don't quite understand what's next.Read the OAuth 2.0 specification.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question