Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Karbust/31ecb8998ab941a74530ce2bff839c3e to your computer and use it in GitHub Desktop.
Save Karbust/31ecb8998ab941a74530ce2bff839c3e to your computer and use it in GitHub Desktop.
Setup Google OAuth for Portainer Remote Access
You're going to need a Google Developer's Account: https://console.developers.google.com/
https://console.cloud.google.com/projectselector2/home/dashboard?authuser=2&organizationId=0&supportedpurview=project
You'll need to know what you want your Portainer URL to be.
Create a Project
Enter a Project Name and click "Create"
APIs & Services
+Create Credentials
OAuth client ID
Configure Consent Screen
External
Create
Give the app a name
Enter a support email
Developer contact information
Nothing on Scopes
Nothing on Test users
Back to Dashboard
Credentials
+Create Credentials
OAuth Client ID
Application Type = Web application
Enter a name: "Portainer"
Authorized JavaScript Origins: https://port.yoursite.com
Authorized redirect URIs: https://port.yoursite.com
Create
Next Page will have:
Your Client ID
Your Client Secret
At some point, you'll want to Publish your App.
Client ID
Client secret
Authorization URL: https://accounts.google.com/o/oauth2/auth
Access token URL: https://accounts.google.com/o/oauth2/token
Resource URL: https://www.googleapis.com/oauth2/v1/userinfo?alt=json
Redirect URL: https://port.yoursite.com
User identifier: email
Scopes: profile email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment