docbrown/docs/backend/auth-facebook.md
Josh Puetz d47d02f090
[deploy] Log in with Facebook (#9922)
* First draft of facebook auth

* Add Facebook welcome broadcast to seeds, data script

* Tests!

* Documentation

* Update docs with pictures

* User siteconfig/app config

* Adjust dropdown menu width to avoid wrap for Facebook button

* Add Facebook auth keys to SiteConfig properly

* Remove unnecessary VCR cassette

* Add omniauth facebook gem to vendor cache

* Use uid instead of email for nickname randomization

* Test fix, test for missing email in Facebook

* Update docs/backend/auth-facebook.md

Co-authored-by: Molly Struve <mollylbs@gmail.com>

* Typo fix!

* Don't default facebook auth settings to ApplicationConfig

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-08-26 12:04:20 -04:00

1.9 KiB

title
Facebook Authentication

Facebook App and Authentication

Forem allows you to authenticate using Facebook. In order to use this authentication method in local development, you will need to setup a Facebook App and retrieve its keys. Then you'll need to provide these keys to the Rails application.

Sign up

  1. Sign in to your Facebook account.

  2. In order to get the API keys, you will have to convert your account to a developer account.

Get API keys

  1. Sign up or sign in to your Facebook developer account.

  2. From My Apps dashboard, click on Add a New App.

facebook-1

  1. Select For Everything Else

facebook-2

  1. Fill in the app display name and contact email, then click on Create App ID

facebook-3

  1. On the Add a Product screen, click Set Up under the Facebook Login section

facebook-4

  1. Ignore the quickstart options, and click Settings -> Basic in the sidebar

facebook-5

  1. From the basic settings screen dashboard copy the App ID and App Secret values to your environment settings accordingly (name of Facebook key -> name of our SiteConfig variable).

    APP ID -> FACEBOOK_APP_ID
    API secret -> FACEBOOK_APP_SECRET
    

twitter-5