authenticate: delay evaluation of OIDC provider (#1802)

* authenticate: delay evaluation of OIDC provider

* add additional error message

* address comments
This commit is contained in:
Caleb Doxsey 2021-01-26 09:20:56 -07:00 committed by GitHub
parent a14b65ec3f
commit 5e3aa91f23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 176 additions and 54 deletions

View file

@ -231,8 +231,8 @@ func (p *Provider) Revoke(ctx context.Context, token *oauth2.Token) error {
// GetSignInURL returns a URL to OAuth 2.0 provider's consent page
// that asks for permissions for the required scopes explicitly.
func (p *Provider) GetSignInURL(state string) string {
return p.Oauth.AuthCodeURL(state, oauth2.AccessTypeOffline)
func (p *Provider) GetSignInURL(state string) (string, error) {
return p.Oauth.AuthCodeURL(state, oauth2.AccessTypeOffline), nil
}
// LogOut is not implemented by github.