1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-07 02:57:20 +00:00
This commit is contained in:
techknowlogick
2021-02-28 18:08:33 -05:00
committed by GitHub
parent 030646eea4
commit 47f6a4ec3f
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))
}