Skip to content

Instantly share code, notes, and snippets.

@milovanderlinden
Last active August 23, 2019 07:38
Show Gist options
  • Save milovanderlinden/ce5d95544502de2212d1c9cb3beb2bcf to your computer and use it in GitHub Desktop.
Save milovanderlinden/ce5d95544502de2212d1c9cb3beb2bcf to your computer and use it in GitHub Desktop.

Social media oauth

Twitter

  • Navigate to apps.twitter.com
  • Click “Create new app”
  • Fill in the form.
  • For the callback URL, provide your site’s address plus “/auth/twitter/callback”. f.i. “https://example.com/auth/twitter/callback”.
  • Click “Create”.
  • You will be redirected to the app’s information page on Twitter. Navigate to the “Keys and Access Tokens” tab.
  • Copy the Consumer Key and Consumer Secret and paste them into the initializer file.
  • Hand them to the administrator of your consul instance so she/he can implement them.

Google

  • Navigate to console.developers.google.com
  • Click “Create Project” and give it a name.
  • Open “APIs” section from the right-side menu and make sure Google+ API is enabled.
  • Open “Consent Screen” and fill in “Product Name” (and other fields if you wish).
  • Open “Credentials” and click “Create new Client ID”.
  • Choose “Web Application”.
  • Enter your app’s URL in the “Authorized JavaScript origins” (f.i. “https://example.com”).
  • Enter your app’s URL plus “/auth/google_oauth2/callback” in “Authorized redirect URIs”.
  • Copy the Client ID and Client Secret
  • Hand them to the administrator of your consul instance so she/he can implement them.

Facebook

  • Before you begin to implement Facebook Login, you need a Facebook App ID, which you can create and retrieve in the App Dashboard.
  • Set up an app, and from the dashboard go to “Settings” > “Basics”
  • For the callback URL, provide your site’s address plus “/auth/facebook/callback”. f.i. “https://example.com/auth/facebook/callback”.
  • the App ID will show at the top, the App Secret can be revealed with a “show” button. Copy both.
  • Hand them to the administrator of your consul instance so she/he can implement them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment