Configuring Instagram login for Discourse


(EW 👌) #1

I couldn’t find any thing related to howto: Configuring Instagram login for Discourse

I did used the example of Facebook for call back “community.example.com/auth/instagram/callback” but I’m getting the following error:

{“code”: 400, “error_type”: “OAuthException”, “error_message”: “Redirect URI does not match registered redirect URI”}

Page link of the error:
https://www.instagram.com/oauth/authorize?client_id=57eda12354698778eb99e&redirect_uri=http://community.EXAMPLE.com/auth/instagram/callback&response_type=code&scope=basic&state=8c5a1d554gtytfghfg54a4ea5a8ec12


I just noticed that Instagram is so different comparing to Facebook or Twitter. After you configure your account and get your keys, you are able to use them only in their sandbox mode. If you need to use them in real life you need to submit a request for permission :open_mouth:.

So I just did it. My request still in pending for permission. I’ll try again after their approval and I’ll update the result in here.


Category definition for howto
Open external links in new tab not working when link is within a quote block
(EW 👌) #2

My request has been declined with the following explanation:

General issues:
Missing Screencast: The link you provided does not show a video screencast detailing a working Instagram Login experience in your app and usage of every permission you are requesting. Please provide an updated link in your submission.
Feedback from your Reviewer:
Thank you for providing such a detailed and descriptive screencast. Unfortunately, I was unable to see the Instagram log in flow or the integration on the site. Please provide a screencast that shows the user linking their account so we can ensure the API is being used properly. Thank you and please resubmit!

So they are expecting us to succeed the login process in sandbox mode and to send screencast off the successful login then they’ll approve the request :unamused:. Keep tuned to see the happy ending :ribbon:


(EW 👌) #3

Its really becoming interesting…

To be able to do the test in instagram sandbox, you should add a new Instagram user account to that sandbox (as allowed sandbox user to test the Discourse sign-in). [So I created a test Instagram new user]

Then you login with this new user (using different browser to be able to stay logged in with the main Instagram account as Admin) and click API from the footer menu then click “Sandbox Invite” from the top menu to accept that invitation to the sandbox.

Now you try discourse sign-in with Instagram from the browser that you logged in with the new test user (to get its credential from cookies by default). And you get exactly the same error as I mentioned in my first post :weary:

But I noticed that in my setup of Instagram API account, even that I configured all my links as https:, Instagram is trying to callback as http:. So I copied the error’s URL link to a new tab in the browser and I edited my discourse site link as https:. And there it is, the expected authorization request of Instagram is showed up. Sure you can’t sign-in to Discourse this way (because of manual interruption of the process).

So I did reported this issue as a bug to Instagram and I’m waiting for their reply :triumph:

:sweat_smile: Stay tuned for my next episode!


(EW 👌) #4

There was no reply from Instagram till now. (But as I could see now, it wasn’t there’s problem!)

By following this hint from:

I did changed all of Instagram, Google, LinkedIn clients callback configuration to http vs. https. All started to show the related authentication windows without errors.

Focusing back to Instagram:
The problem here with Instagram Sign-up that when I’m tying to crate a Discourse account with it, I’m getting back only the [User Name] and first char of the [Name] and No [email]! :open_mouth: .

I have no idea why neither I know the solution. Anybody could help please!. :sweat:


(Rafael dos Santos Silva) #5

Instagram OAuth doesn’t return e-mail: Instagram Developer Documentation


(EW 👌) #6

Aha :hushed: Thank you for the clarification. I really wasn’t expected that. But good to know that it is normal :slight_smile:

It’s mean that’s It. We concluded the subject of Instagram login. :ribbon:


(EW 👌) #7

Login with Instagram still not working! :name_badge:

Since Instagram is not providing an email with its callback, Discourse is not accepting to create the account. So I entered the email manually. The account created but not able to login using Instagram. Discourse is acting like we are creating a new account again!. It’s seems like it is impossible to login using Instagram.

I wonder if anybody succeeded this before. If anyone had success please share it with us!. :mega:


#8

Thanks for all this, waiting patiently for Instagram instructions. Makes one wonder though why DC added it as an option.


#9

Is there any update with regards to Instagram authentication ?


(Diego Barreiro) #10

I have a community where I was able to enable it :confused:


(Jay Pfaffman) #11

I was well on my way to writing a proper #howto until I saw that in order to get them to approve your app you have to create a screen cast. If anyone wants to pay me $1000, I’ll consider it. I hate screen casts.


(Diego Barreiro) #12

For my app I hadn’t to make a ScreenCast :confused:
But what they do is review apps manually. Once you create your app, it would be in SandboxMode. You have to submit for review and their team would have to aprove it

But IDK why it doesn’t take the email
Everything works fine but the login doesn’t take user’s email

You can test it here


(Jay Pfaffman) #13

Interesting. Well, I do have a couple screen shots. Maybe I should write one anyway.


(Nur) #14

any updates?

how to enable instagram login?


(Jay Pfaffman) #15

It’s basically the same as the others. If you’ve done all of those, you can likely do it. You’ll still have to convince them to enable it.


(Christoph) #16

Except that you need to provide a screencast and go through a review process. :wink:

@n-ur, To start setting up your instagram login, go to https://www.instagram.com/developer/

However, I’m wondering what the point is in setting up Instagram authentification when the api doesn’t provide the email address. Is there any point at all?

All the above pertains to what is now called the Instagram Platform API. But what about the Instagram Graph API? Can/Could it be used with discourse?


(Jay Pfaffman) #17

Yeah. I wrote that before I understood about the screen cast or that you don’t get an email address. I don’t really understand what use it is. And they’re owned by Facebook, so I don’t see why the rules would be so different.