nodebb-plugin-sso-facebook not working as expected
-
I have installed the nodebb-plugin-sso-facebook plugin, created a Facebook app and input my client ID + secret.
I have tried several times to register a user with Facebook and I keep getting the same problem. The user allows the app and is then redirected back to the index of the website.
When the user clicks 'login with Facebook', they are redirected back to the index and are not logged in.
In Admin>manager>users, the user appears to have an account.
I'm not seeing any on-page errors, is there an error log that I can look at?
Tom
-
I guess you have a problem with routes (path, slug) and maybe with http(s). Please check domain configuration and config.json.
-
I've had a look at my nginx config and config.json and can't find a problem. I've tried it with http and https, with and without https set in CloudFlare.
My config.json looks like:
{
"url": "https://aussiesupover.com",
"secret": "",
"database": "mongo",
"port": 4567,
"mongo": {
"host": "127.0.0.1",
"port": "27017",
"database": "0"
}
}I set the callback URL in Facebook to domain.com/auth/facebook/callback
I'm really confused as to why its not working? Can you suggest anything else that I should check?
-
You have a problem with WebSockets (WS) and CloudFlare (WS is supported in Pro plans only).
For OpenShift it works to disable https for WS/socket.io.
https://community.nodebb.org/topic/7990/cant-update-user-profile-getting-error/10 -
Please reload/restart NodeBB and try again.
-
Please reinstall
nodebb-plugin-sso-facebook
.
Not working? Disable all plug-ins and enable them one-by-one and check changes.
Change your callback from https to http (nginx too and restart) as I can enter your website usinghttp://aussiesupover.com
-
Please remember to modify
https://aussiesupover.com
in config.json toaussiesupover.com
-
@nhl.pl So I deactivated all plugins and uninstalled sso-Facebook. I reinstalled sso-Facebook and restarted nodebb.
I changed every record of https to http and removed CloudFlare, the domain is now pointing directly at the sever.
Facebook logins are still redirecting back to the home page without logging the user in.
Is there a log file that I can have a look at?
Tom
-
You have to stop NodeBB from command line and run it in dev mode.
Edit: https://docs.nodebb.org/en/latest/help/help.html?#how-do-i-start-stop-restart-nodebb
-
@nhl.pl Okay, so I stopped nodebb and restarted in dev. I logged in with my personal Facebook account (the one that the app was made with) and it seems to be working.
I used someone elses and I got the same problem as before. I can't see any errors in the logs when a user logs in.
I"m going to try with a Twitter app and see if I can get that to work. If it also doesn't work, I'll assume its a problem with routing.
Tom
-
I don't have accounts on Facebook and Twitter so can't help to test it.
Good luck!
-
@tomanagle Hmm, I've attempted to use HTTPS to your site and cannot appear to connect. However HTTP works.
-
@nhl.pl Okay, so I've been testing for the last couple of days and it works, sometimes.
I can login with Instagram and Facebook with my own account. I used the Instagram account that I made the API with and another one, they worked. I then used my girlfriends account and that didn't work.
I tried Google authentication, that did the same thing. It made the user and redirected to the homepage without logging in.
I tried Twitter API and that just wouldn't save my API credentials.
I'm lost as to what I should try next? I'm guessing that there is a common reason why none of them are working.
Should I be using PLEASE in front of queries for Mongodb?
-
You should never test two plug-ins doing similar thing at the very same time. You'll end up in a situation you have right now.
There was an issue "Facebook login disappears on activation of sso-twitter" in nodebb-plugin-sso-facebook repo.
And if you can reproduce it on a fresh install you may open an issue here:
https://github.com/julianlam/nodebb-plugin-sso-facebook/issues