Skip to main content

Configure external Facebook login

Integrating Facebook sign-in into your web application allows users to authenticate using their Facebook accounts.

1. Create a Facebook App

  • Go to Meta for Developers and log in with your Facebook account.
  • Navigate to My Apps > Create App.
  • Choose For Everything Else as your app type.
  • Enter your app details, such as name and contact email, then click Create App ID.

2. Configure Facebook Login

  • Inside your app dashboard, find the Add a Product section and select Facebook Login > Set Up.
  • Choose Web as the platform.
  • Enter your site URL when prompted.

3. Specify OAuth Redirect URIs

  • Navigate to the Facebook Login section in your app's dashboard.
  • Click on Settings under Facebook Login.
  • In the Valid OAuth Redirect URIs field, enter the URI where users will be redirected after login (e.g., https://yourdomain.com/account/login).
  • Enable Login with the Javascript SDK
  • In the Allowed Domains for the JavaScript SDK field, enter the URI where users will be redirected after login (e.g., https://yourdomain.com).
  • Save changes.

4. Secure Your App

  • Still in the Facebook Login settings, ensure you configure the Client OAuth Settings securely:
    • Client OAuth Login: Enabled, allowing OAuth flows from client devices.
    • Web OAuth Login: Enabled, allowing OAuth flows from web applications.
    • Enforce HTTPS: Ensure this is enabled for secure OAuth redirects.

5. Set up WeSolve Settings

  • Open the External Login Settings and change the following values:
    • App ID: Insert the Meta application's App ID
    • App secret: Insert the Meta application's App Secret
  • Save changes.