OAuth2 Endpoint for Google Updated

76 views
Skip to first unread message

bwj.j...@gmail.com

unread,
Jun 23, 2020, 12:34:02 PM6/23/20
to golang-nuts
It looks like the endpoint for authorization for OAuth2 for google is: https://pkg.go.dev/golang.org/x/oauth2/google?tab=doc#pkg-variables

var Endpoint = oauth2.Endpoint{
       
AuthURL:   "https://accounts.google.com/o/oauth2/auth",
       
TokenURL:  "https://oauth2.googleapis.com/token",
       
AuthStyle: oauth2.AuthStyleInParams,
}

But it looks like https://developers.google.com/identity/protocols/oauth2/web-server#httprest recommends this endpoint:

Google's OAuth 2.0 endpoint is at https://accounts.google.com/o/oauth2/v2/auth. This endpoint is accessible only over HTTPS.

Does this need to be updated, and how would I go about updating this?
Reply all
Reply to author
Forward
0 new messages