I'm creating a react native app and adding 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 this working on my web app fine.. The flow is as follows:
https://instagram.com/oauth/authorize/?client_id=xxxx blah blah
REDIRECT_URI
with a CODE
parameterCODE
parameter and sends a post request to instagram with all the credentials. ACCESS_TOKEN
Can someone tell me how this is supposed to work in an app?
What's my REDIRECT_URI
supposed to be? The server api?
Is it the same flow as my web app? If so, how do I get the users back to my app after the window is closed. How does my app know that the user now has an access token?
With a native application the flow is similar to what you described for the 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 later access an API on behalf of that user.
com.myinstaapp:
, a local web server with the http:
scheme or a few other options; (see this answer on OAuth redirect URI for native application for other alternatives)
The flow described in the Auth0 scenario assumes that authentication will happen through an OpenID Connect compliant flow and in addition you'll get the access token as specified by OAuth2. I'm not overly familiar with Instagram so if they only support OAuth2 that part is of course not applicable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With