Skip to main content

Facebook

Browse to https://developers.facebook.com/apps/ and click "Create App".

Facebook Developers - Apps

When asked about "What do you need your app to do?", choose "Build Connected Experiences".

Facebook Developers - New App - App Type

Next, choose the name for the application:

Facebook Developers - New App - App Name

Once your app (in this case App ID is 38409328409) is available, click "Set Up" next to "Facebook Login" product:

Facebook Developers - App Screen

When at Quickstart screen, select "Other".

Next, click "Settings - Advanced" on the left navigation bar and browse to "Security" section.

Set "Require App Secret" to "Yes". The Client Token is not being used because client_secret is being used to calculate appsecret_proof.

Facebook Developers - App Settings - Advanced

Next, click "Settings - Basic" on the left navigation bar and extract "App Secret". The App Secret is used in client_secret Caddyfile directive.

Facebook Developers - App Settings - Basic

Next, click "Settings" under "Facebook Login" on the left navigation bar and browse to "Client OAuth Settings" section:

Set "Valid OAuth Redirect URIs" to:

  • https://localhost:8443/auth/oauth2/facebook/authorization-code-callback

Facebook Developers - Facebook Login - Settings

Additionally, add the URL in "Redirect URI Validator":

  • https://localhost:8443/auth/oauth2/facebook/authorization-code-callback

The following Caddyfile allows Facebook-based authentication.

When a user get redirected to Facebook Login, the screen looks as follows:

Facebook Developers - Facebook Login - User Login