AUTHENTICATION_SOURCES = ['oauth2', 'internal']
OAUTH2_AUTO_CREATE_USER = True
OAUTH2_CONFIG = [{
  'OAUTH2_NAME': '<%= @pg_oauth2_name %>',
  'OAUTH2_DISPLAY_NAME': '<%= @pg_oauth2_display_name %>',
  'OAUTH2_CLIENT_ID': '<%= @pg_oauth2_client_id %>',
  'OAUTH2_CLIENT_SECRET': '<%= @pg_oauth2_client_secret %>',
  'OAUTH2_TOKEN_URL': '<%= @pg_oauth2_token_url %>',
  'OAUTH2_AUTHORIZATION_URL': '<%= @pg_oauth2_authorization_url %>',
  'OAUTH2_API_BASE_URL': '<%= @pg_oauth2_api_base_url %>',
  'OAUTH2_USERINFO_ENDPOINT': '<%= @pg_oauth2_userinfo_endpoint %>',
  'OAUTH2_SERVER_METADATA_URL': '<%= @pg_oauth2_server_metadata_url %>',
  'OAUTH2_SCOPE': '<%= @pg_oauth2_scope %>',
  'OAUTH2_ICON': '<%= @pg_oauth2_icon %>'
}]

WTF_CSRF_HEADERS = ['X-CSRF']