1
0
Fork 0
forked from forgejo/forgejo
This commit is contained in:
techknowlogick 2021-02-28 18:08:33 -05:00 committed by GitHub
parent 030646eea4
commit 47f6a4ec3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
947 changed files with 26119 additions and 7062 deletions

View file

@ -184,3 +184,13 @@ func (p *Provider) SetHostedDomain(hd string) {
}
p.authCodeOptions = append(p.authCodeOptions, oauth2.SetAuthURLParam("hd", hd))
}
// SetLoginHint sets the login_hint parameter for the google OAuth call.
// Use this to prompt the user to login with a specific account.
// See https://developers.google.com/identity/protocols/oauth2/openid-connect#login-hint
func (p *Provider) SetLoginHint(loginHint string) {
if loginHint == "" {
return
}
p.authCodeOptions = append(p.authCodeOptions, oauth2.SetAuthURLParam("login_hint", loginHint))
}