Skip to content

Instantly share code, notes, and snippets.

@ricardopadua
Last active August 26, 2022 15:55
Show Gist options
  • Save ricardopadua/0b7e73cda60f7a1405c08e7e6060a7bb to your computer and use it in GitHub Desktop.
Save ricardopadua/0b7e73cda60f7a1405c08e7e6060a7bb to your computer and use it in GitHub Desktop.
sample configuration pgadmin4
AUTHENTICATION_SOURCES = ['oauth2']
OAUTH2_AUTO_CREATE_USER = True
OAUTH2_CONFIG = [{
'OAUTH2_NAME': 'github',
'OAUTH2_DISPLAY_NAME': 'Github',
'OAUTH2_CLIENT_ID': xxxxxxxxxx,
'OAUTH2_CLIENT_SECRET': xxxxxxxxxxxx,
'OAUTH2_TOKEN_URL': 'https://github.com/login/oauth/access_token',
'OAUTH2_AUTHORIZATION_URL': 'https://github.com/login/oauth/authorize',
'OAUTH2_API_BASE_URL': 'https://api.github.com/',
'OAUTH2_USERINFO_ENDPOINT': 'user',
'OAUTH2_ICON': 'fa-github',
'OAUTH2_BUTTON_COLOR': '#3253a8',
},{
'OAUTH2_NAME': 'google',
'OAUTH2_DISPLAY_NAME': 'Google',
'OAUTH2_CLIENT_ID':xxxxxxxxxx,
'OAUTH2_CLIENT_SECRET': xxxxxxxxxxxx,
'OAUTH2_TOKEN_URL': 'https://oauth2.googleapis.com/token',
'OAUTH2_AUTHORIZATION_URL': 'https://accounts.google.com/o/oauth2/auth',
'OAUTH2_API_BASE_URL': 'https://openidconnect.googleapis.com/v1/',
'OAUTH2_USERINFO_ENDPOINT': 'userinfo',
'OAUTH2_ICON': 'fa-google',
'OAUTH2_BUTTON_COLOR': '#3253a8',
'OAUTH2_SCOPE': 'openid email profile',
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment