This documentation site is about the unstable (upcoming) Comentario version.  Switch to the stable version »

Login via Facebook

How to configure OAuth2 login via Facebook

To let your users sign in with their Facebook account, follow the below steps.

  1. Register a Meta Developer account.
  2. Navigate to the Facebook apps page.
  3. Click Create app.
  4. Choose Authenticate and request data from users with Facebook Login, then Next:
    Image
  5. Click No, I’m not building a game, then Next.
  6. Give the application a name and provide a contact email, then click Create app:
    Image
  7. Enable the email permission:
    Image
  8. In Facebook Login settings (the page shown above), make sure Web OAuth login is enabled, and add the Facebook callback URL https://<your-comentario-domain>/api/oauth/facebook/callback as Valid OAuth Redirect URI:
    Image
  9. Navigate to App settingsBasic. There you’ll be able to copy App ID and App secret. Store them in a safe place for future reference. Also provide additional details (Privacy policy URL, Data deletion URL):
    Image
  10. Submit the application for verification.
  11. Update the secrets configuration with the above data, putting the App ID into key and App secret into secret:
...
idp:
  facebook:
    key:    413690874551549
    secret: 84c8b978cdd0bb3b12d5069fdfac3185
...
  1. Restart Comentario. You should now see Facebook under Configured federated identity providers on the Static configuration page of the Administration UI.
  2. Still in the Admin UI, navigate to the desired domain properties and tick off Facebook on the Authentication tab, then click Save.
    Image

That’s it! Your users should now be able to login using the Facebook button in the Login dialog.

See also