This commit is contained in:
Kenta420 2024-01-25 16:54:57 +07:00
parent 5cf0a8b761
commit 28cdbbc4f9
5 changed files with 84 additions and 1 deletions

View file

@ -52,7 +52,13 @@ func (o *oauthService) AuthURL(state string, stateMap map[string]string) string
o.nonce[state] = make(map[string]string)
}
return o.gConfig.AuthCodeURL(state, oauth2.SetAuthURLParam("hd", "forth.co.th"), oauth2.SetAuthURLParam("include_granted_scopes", "true"), oauth2.AccessTypeOffline)
authCodeOptions := []oauth2.AuthCodeOption{
// oauth2.SetAuthURLParam("hd", "forth.co.th"),
oauth2.SetAuthURLParam("include_granted_scopes", "true"),
oauth2.AccessTypeOffline,
}
return o.gConfig.AuthCodeURL(state, authCodeOptions...)
}
func (o *oauthService) GetState(state string) (map[string]string, bool) {