Question

Photo of Richelle Onda

0

Facebook Login Integration

Hi Team,


I have been doing this Facebook login integration and yet it does not work.

I have managed to do Google and Twitter successfully but no luck with Facebook.

It seems I have configured everything correctly as there are no errors popping up.

What happens is when you click on the Facebook button, it will be authenticated by Facebook and be redirected to my RockRMS page but nothing happens.

I was not logged in whatsoever and just redirected to the login page where the Facebook button is.

Can you check it please. our external rockrms site is http://destinationcitychurch.org/page/207

May I know an answer for this please?


  • Photo of Nathan Parikh

    0

    Hi Richelle,

    I had problems with it too initially, but the problem is likely with your Facebook app configuration.

    One place to start would be to check the "Valid OAuth redirect URIs" under the Facebook Login Settings for your app.

    ~ Nathan

  • Photo of Jay Greentree

    0

    Make sure your domain settings on the facebook developers page looks something like the image below with your rock urls
    2016-09-07 15_23_39-Thursday CHurch - Settings - Facebook for Developers.png

  • Photo of Richelle Onda

    0

    I have tried these recommendations and even googled about possible solutions. Still, no luck :(

  • Photo of Knolly Shadrache

    0

    I'm posting some of our experience on the road to getting facebook authentication working in the hope it will save time for someone.

    Since May 2018, facebook started enforcing strict redirect urls. We had to do 2 things to get things working:


    1. Enter the precise redirect URL - including the port address

    We had to make sure the redirect URL was EXACT, and included the 'port' being used:

    Eg

    https://my.churchurl.org:443/page/207/ - The port in this case is :443


    or http://my.churchurl.org:80/page/207/ - The port in this case is :80

    You can test the redirect URL at the bottom of the app page in facebook developer.


    2. Fix the broken return url

    We found that after the user was authenticated, they were sent back to the internal Rock home page instead of the external page (we are using external for non staff). If someone isn't staff, they didn't have access so they got a permissions complaint notice page instead of getting into the site.


    This happened because in facebook authentication, Rock looked for a parameter called 'returnurl' that is not permitted in the redirect url configured in the facebook app. So as it couldn't find the return url, it defaulted to whatever it found in web.config, which is the Internal site home page:

       <authentication mode="Forms">
          <forms cookieless="UseCookies" defaultUrl="Page/12" loginUrl="Login" name=".ROCK" slidingExpiration="true" timeout="15" />
        </authentication>


    We changed this from "Page/12" to "Page/1" to fix this second issue.If there's a better way I guess someone can let us all know.


    After these changes everything worked!!