Created
March 1, 2021 00:58
-
-
Save dnburgess/b0562675f27d9ab44fa6fc17cbc48ee7 to your computer and use it in GitHub Desktop.
Setup Google OAuth for Portainer Remote Access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This video should provide additional clarity: https://www.youtube.com/watch?v=IUBqsl_7uuc
Please note an important step: after enabling Google OAuth2 Login, a user account with the same Gmail address must be created in advance. Without this, the login attempt will not work.
I hope this helps!
[1/25/2025] Unfortunately this guide doesn't work anymore so I made a new one.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks heaps mate!