Answer the question
In order to leave comments, you need to log in
What kind of flow does the stateless logic of login through social. OAuth2 networks?
My current Github
implementation
The fact is that most of the examples (I apparently haven’t seen others) on the web are for REST, but not completely STATELESS.
The question is whether the client should authorize through social networks and send the received data to the backend (email, photo etc).
Or the logic when the server takes over this task is also correct:
First sends the authorization URL to the client (fb.com/oauth...).
Then the user gives his consent, and the provider (FB), redirects him to the specified redirect URL, passing the access_token or code, with which the backend already receives user data (email, photo etc)
It's just that the 2nd option looks strange from the stateless point of view: As a client (SPA app.) should redirect?
Если после того, как он уходит с сайта, он уже не получит ответ от сервера на свой запрос от авторизации, вместо этого будет опять редирект на серверный URL, а так как это stateless сервер не будет знать кому обновить инфу о юзере и отправить response, так как нет открытого request.
А если еще клиент это mobile, то там вообще странно выглядит этот флоу со всякими редиректами, инициированными backend.
подскажите какой должен быть флоу/логика для stateless авторизации через соц сети, как бэкенду это делать?
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