websauna.system.user.googleoauth module

Patched Google provider until we get upstream fixed.

https://github.com/peterhudec/authomatic/issues/153

class websauna.system.user.googleoauth.Google(*args, **kwargs)[source]

Bases: authomatic.providers.oauth2.OAuth2

Google oauth2 provider.

Supported User properties:

  • email

  • first_name

  • gender

  • id

  • last_name

  • link

  • locale

  • name

  • picture

Unsupported User properties:

  • birth_date

  • city

  • country

  • nickname

  • phone

  • postal_code

  • timezone

  • username

Note

To get the user info, you need to activate the Google+ API in the APIs & auth >> APIs section of the`Google Developers Console <https://console.developers.google.com/project>`__.

access_token_url = 'https://accounts.google.com/o/oauth2/token'
supported_user_attributes = SupportedUserAttributes(birth_date=False, city=False, country=False, email=True, first_name=True, gender=False, id=False, last_name=True, link=False, locale=True, location=False, name=True, nickname=False, phone=False, picture=True, postal_code=False, timezone=False, username=False)
user_authorization_url = 'https://accounts.google.com/o/oauth2/auth'
user_info_scope = ['profile', 'email']
user_info_url = 'https://www.googleapis.com/oauth2/v3/userinfo?alt=json'