Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.73 KB

15_enable_google_login.rst

File metadata and controls

44 lines (34 loc) · 1.73 KB

ViUR and Google Auth

This changes took effect on ViUR >=3.3. In case you're using a prior version, you need to handle it differently.

  1. Open the Google Cloud Console website as an admin user
  2. Open the API & Services OAuth conset screen menu
  3. Declare your user type and click the "Create" button
  4. Fill in the App information "Save and Continue"
  5. Click the Button "Add or Remove Scopes" and choose the following scopes:
    1. ../auth/userinfo.mail
    2. ../auth/userinfo.profile
    3. openid

Note

Those scopes are the general scopes to get user information

  1. Save and Continue
  2. Navigate to API & Services Credentials
  3. Press the button "+ create credentials"
  4. Select "OAuth Client ID"
  5. Enter your application type as "Web Application"
  6. Enter a name for your OAuth 2.0 client
  7. Click the "Add URI" button, under the "Authorized Javascript origins" headline
  8. Enter your redirect URL's

    For deployed Software we recommend:
    "https://projectname.appspot.com"
    If you want to use the Google LogIn in your development System you will also need to add:
    "http://localhost:8080"
    "http://localhost"
  9. Click the "Create" buttton
  10. Copy the client ID of the succes message to your clipboard
  11. Open the main.py of your ViUR project and add the config variable and the id

#.. code-block:: python # # Insert your clientID as String # conf["viur.user.google.clientID"] = " " # # If you are a gsuitecustomer, you can whitelist mails form certain Domains # conf["viur.user.google.gsuiteDomains"] = ["viur.com"]