A
A
Alex Wells2016-04-17 17:37:29
JSON Web Token
Alex Wells, 2016-04-17 17:37:29

JWT Auth + Social?

Hello. There is authorization through Steam, on Laravel. The logic is as follows:
1) User presses the "login" button on the site and redirects him to the steam page
2) there he also presses "everything is ok, log in".
3) he again gets to my site, this time with data from steam. if everything is ok - the user is authorized and redirected to the main page.
All this is good, but if not for one thing: I also need to use angular and socket io, and now I also want to use JWT Auth. It should either look like this:
- the same as in the first case, but at the very end, when getting to the site, the user must wait for some authorization on angular and on the socket server
, or like this:
clicks on the authorization button -> a window with steam opens, he clicks "everything is ok, log in" -> waits for authorization -> the data is updated, and voul, the user is authorized.
Only I don't understand how to do it. Even close. I understand the essence of JWT perfectly.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
D', 2016-04-17
@Alex_Wells

What is the actual problem?
After a successful redirect, we write a token to the user (in cookies or in localStorage) and redirect to the main one, and there angular will pick up the token and start working.

A
Alex Wells, 2016-04-17
@Alex_Wells

Closed. For those who have the same trouble: read D' Normalization's answer and comments to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question