@nodeham Thank you for all of the help. I will start a new thread for the next problem I am seeing.
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?
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:
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.
@nhl.pl I've disabled CF and https. The error in the console has disappeared.
However, I'm still having the same problem with Facebook logins. I'm not sure where to look to try and resolve the issue?
Please reload/restart NodeBB and try again.
@nhl.pl I reloaded, restarted and restarted nginx.
I'm still getting the same issue.
Could the error be with my redirect URL in the Facebook app?
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 using
Please remember to modify
https://aussiesupover.comin config.json to
@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?
You have to stop NodeBB from command line and run it in dev mode.
@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.
I don't have accounts on Facebook and Twitter so can't help to test it.
Robert last edited by
@tomanagle Hmm, I've attempted to use HTTPS to your site and cannot appear to connect. However HTTP works.
@Kowlin Yeah, I turned HTTPS off. I was using CloudFlare SSL.
HTTPS wasn't my issue but, it was Facebook logins.
@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: