Google OAuth 2 authorization - Error: redirect_uri_mismatch

前端 未结 30 1910
遥遥无期
遥遥无期 2020-11-22 02:58

On the website https://code.google.com/apis/console I have registered my application, set up generated Client ID: and Client Secret to my a

30条回答
  •  隐瞒了意图╮
    2020-11-22 03:14

    If you use this tutorial: https://developers.google.com/identity/sign-in/web/server-side-flow then you should use "postmessage".

    In GO this fixed the problem:

    confg = &oauth2.Config{
            RedirectURL:  "postmessage",
            ClientID:   ...,
            ClientSecret: ...,
            Scopes:      ...,
            Endpoint:     google.Endpoint,
    }
    

提交回复
热议问题