A
A
Alex White2019-04-07 09:47:16
PHP
Alex White, 2019-04-07 09:47:16

OAuth authorization of Instagram on a SPA application?

Greetings. Please direct me in the right direction)
Available:
1. Front SPA application on Angular
2. Back REST API on php Required
:
Authorization (binding) of social networks to the user profile in the application. I'm not an Angularist, so it's a little difficult for me to understand how this works in the case of SPA. If it was a regular web application, then there is no question .. we went to the social network site, back the redirects received a token and that's it ...
How to do all this in the case of Angular?
1. We clicked on the authorization link (button).
2. We went to the social network site.
3. We pressed the button there that we allow the application access to the profile
4. We should go further with a redirect .. a request came to our back.
5. Got the code...
6. Sent again a POST request to the social server API
7. Received a token, recorded it in the database ..
And then questions))
8. What should I do with this token now? How can I tell the one-pager that we have a token? Page reload? like in normal applications? so it seems this is not the SPA way)) what to do then?)
Thank you))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-04-07
@inoise

The easiest way is to connect Auth0 (but that's money). A little more complicated, but free - deploy Keycloak (but you need a brain and not all social networks are there, although there is a test)
Well, or you can suffer and write your identity server by hand)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question