Topic-icon Instagram login fails

Active Subscriptions:

None
5 years 4 weeks ago #65267 by petgal
Instagram login fails was created by petgal
Hi,
I had this working properly and then it stopped working. I got this message on a completely white page

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

I thought this was due to my being in sandbox mode and not having the app approved. So I submitted it and it was approved, but I just tried again and the same failure above applies. Would greatly appreciate if you could sort this out quickly.
Thanks
File Attachment:
The topic has been locked.
Support Specialist
5 years 4 weeks ago #65269 by alzander
Replied by alzander on topic Instagram login fails
The error message states "Redirect URI does not match registered redirect URI". Please double-check that you've followed our Instagram Setup Guide . Specifically, step 4e for setting the "Valid redirect_uri".

Other things to note are that SEF extensions on your site may alter the URLs JFBConnect generates and cause issues. I'd recommend disabling SEF URLs to see if that fixes the problem. The final thing is to try disabling caching on your site to see if that helps. Any of those will help narrow things down as tot he possible cause if the app settings are correct.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
5 years 4 weeks ago - 5 years 4 weeks ago #65271 by petgal
Replied by petgal on topic Instagram login fails
This is what's in Instagram's developer's page for item 4e
www.goodtalktnt.com/index.php

Caching was already disabled
Turned off SEF urls and same problem.


File Attachment:
Last edit: 5 years 4 weeks ago by petgal.
The topic has been locked.
Active Subscriptions:

None
5 years 4 weeks ago #65272 by nielsbinder
Replied by nielsbinder on topic Instagram login fails
Following the jfbconnect guide also did not work for me. I just tried:

https://yourdomain/index.php?option=com_jfbconnect&task=authenticate.callback&provider=instagram

which works for me ...
The topic has been locked.
Active Subscriptions:

None
5 years 4 weeks ago #65273 by petgal
Replied by petgal on topic Instagram login fails
That actually worked but instead of logging me in, it's taken me to a login page on my own site and asking me to login and then it will link both accounts.
File Attachment:
The topic has been locked.
Support Specialist
5 years 4 weeks ago #65274 by alzander
Replied by alzander on topic Instagram login fails
Thanks nielsbinder for your input.

The redirect_uri should only require index.php. The query string parameters can vary, so most OAuth2 implementations don't require them. I just double checked our settings and we use index.php only. With that said, every social network changes over time, and what works for 'older' apps doesn't always work for newer ones. We'll investigate and tinker, but the full query string URL should be fine and not cause any problems, so use that and keep testing.

it's taken me to a login page on my own site and asking me to login and then it will link both accounts.

This is normal behavior for Instagram. Their API has no way to allow a website to fetch the user's email address. Without that, JFBConnect can't automatically create an account or link the user to an existing account. We have to bring them to that page to have the user decide how to register.

If the user is already logged into your site and uses the Instagram login button (like you can see in the top right My Account menu on this site) then their account will be automatically linked. Then, when they login with Instagram in the future, they'll login to the same account.

I hope that helps explain,
Alex
The topic has been locked.
Active Subscriptions:

None
5 years 4 weeks ago #65276 by petgal
Replied by petgal on topic Instagram login fails
That's very curious because when I tested in sandbox it connected just like Facebook. Also interesting is if a user never created an account directly on your site (like I never did on Sourcecoast) but rather logged in with Facebook, there is no way to login because there is no password to fill in on the login form. This just happened on your site.
The topic has been locked.
Support Specialist
5 years 4 weeks ago #65277 by alzander
Replied by alzander on topic Instagram login fails
Instagram never has allowed fetching the email. The sandbox mode wouldn't have worked any differently. The only guess I have is that when you tested before, you were already logged into the site, so the account was connected to the logged in account.

Also interesting is if a user never created an account directly on your site (like I never did on Sourcecoast) but rather logged in with Facebook, there is no way to login because there is no password to fill in on the login form. This just happened on your site.

The left-hand side "Login" portion of the form has the same social login buttons as well. So, if a user created an account with Facebook, they'd have to click the Facebook account button to login again. Once they did that, they instagram account would be connected to the same Joomla account the Facebook account is already connected too.

You should see those on this site. I can take a picture if you can't see it anymore.

JFBConnect also has the option to email the user a password when they register through a social network. Additionally, the user can use the User Profile or Reset Password functionality to set the password for their Joomla account, if they wanted too.

Alex
The topic has been locked.
Active Subscriptions:

None
5 years 4 weeks ago #65278 by petgal
Replied by petgal on topic Instagram login fails
OK. The concern for me is that a user logs in with one of these platforms to simplify the process and many won't know they also have a Joomla account to connect their social platform to. Facebook does this well. Click, accept, you're in. If this is standard for Instagram, I'd be surprised if instagram users use the login with Instagram button. It in fact, slows down the registration process.

But did I understand you correctly, if a user is logged in to Instagram, and they then try to login to my site it would work? Does this apply also for a first time login (registration)?

QUOTE: The left-hand side "Login" portion of the form has the same social login buttons as well. So, if a user created an account with Facebook, they'd have to click the Facebook account button to login again. Once they did that, they instagram account would be connected to the same Joomla account the Facebook account is already connected too.
UNQUOTE

I in fact, did do something I expect most users wouldn't do. Because I'm testing i'm logging in with each separate button, which a real user is unliely to do.
The topic has been locked.
Support Specialist
5 years 3 weeks ago #65283 by alzander
Replied by alzander on topic Instagram login fails

The concern for me is that a user logs in with one of these platforms to simplify the process and many won't know they also have a Joomla account to connect their social platform to. Facebook does this well.

Facebook only has one account. With JFBConnect, we're linking social networks to your Joomla site. We do our best to hide how Joomla works under the hood for users of your site, but we can't change how Joomla works completely. We need a Joomla account to connect the user to.

If this is standard for Instagram, I'd be surprised if instagram users use the login with Instagram button. It in fact, slows down the registration process.

It's standard for Instagram. There is no way to get the email address for the user, so that registration page must show in order to create a new user or connect the visitor to an existing account.
If you think it slows your registration process down or isn't helpful, I'd recommend disabling Instagram integration.

ut did I understand you correctly, if a user is logged in to Instagram, and they then try to login to my site it would work? Does this apply also for a first time login (registration)?

No, that is not correct. If a user is logged in on *your* site and uses the Instagram login button *on your site*, then JFBConnect will know which Joomla account to connect the Instagram user too. Then, if they return later and use Instagram to login, it will log them into that Joomla account.

Alex
The topic has been locked.