Setup Google OAuth for Portainer Remote Access
Setup Google OAuth for Portainer Remote Access
Just found this very good youtub video - Securely Login to Portainer Remotely with Google Authentication
He also has a Github Gist
Steps from the Gist
You're going to need a Google Developer's Account: https://console.developers.google.com/
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.
In portainer
- Client ID: from Google
- Client secret: from Google
- 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
Published:
by Matt Horwood