Respond to explicit Instagram authentication

I create a responsive native application and add instagram authentication to it. I want users to be able to "add" their instagram accounts to their main user account, so I have a "connect your instagram" button.

I have work on my web application. The stream is as follows:

  • The user clicks the "connect instagram" button, and a new window opens and is directed to https://instagram.com/oauth/authorize/?client_id=xxxx blah blah
  • The user authenticates and redirects instagram to mine REDIRECT_URIwith parameterCODE
  • My API server accepts the parameter CODEand sends an email request to instagram with all credentials.
  • Instagram checks this information and gives users ACCESS_TOKEN

Can someone tell me how this should work in an application?

What should be mine REDIRECT_URI? Api server

Is this the same thread as my web application? If so, how can I return users to my application after closing the window. How does my application know that the user now has an access token?

+4
source share
1 answer

With a native application, the stream is similar to what you described for a web application.

The Auth0 Mobile + API architecture scenario describes what should happen when you need to authenticate a user for a mobile application and then access the API on behalf of that user.

Summary

  • You will continue to use the grant of the authorization code;
  • , , , PKCE ( OAuth) ;
  • ; com.myinstaapp:, - http: ; (. URI OAuth )
  • , , , -; ( , , )

, Auth0, , , OpenID Connect, , , , OAuth2. Instagram, , OAuth2, , , .

+2

Source: https://habr.com/ru/post/1661642/


All Articles