Skip to content

Testing Google OAuth login

Roey Darwish Dror edited this page Sep 19, 2017 · 1 revision
  1. Go to Google API Console.
  2. Click on the dropdown menu at the top that says "Select a project", and then click on the plus sign to create a new project. Name the project "anyway".
  3. Go to "Credentials", click "Create credentials" and then choose "OAuth client ID". You'll be asked to configure the OAuth screen, so just fill in the minimum required for clicking "apply".
  4. Choose "Web Application".
  5. Under "Authorized JavaScript origins" fill in http://localhost:5000.
  6. Under "Authorized redirect URIs" fill in http://localhost:5000/callback/google
  7. Click "create".
  8. Set the environment variables GOOGLE_LOGIN_CLIENT_ID and GOOGLE_LOGIN_CLIENT_SECRET to the keys that you got and launch the server. You should be able to login now.

Do commit these keys into the repository and do not share them with anyone.