Google OAuth 2 authorization - Error: redirect_uri_mismatch

前端 未结 30 1974
遥遥无期
遥遥无期 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:23

    For my web application i corrected my mistake by writing

    instead of : http://localhost:11472/authorize/
    type :      http://localhost/authorize/
    
    0 讨论(0)
  • 2020-11-22 03:23

    Checklist:

    • http or https?
    • & or &?
    • trailing slash(/) or open ?
    • (CMD/CTRL)+F, search for the exact match in the credential page. If not found then search for the missing one.
    • Wait until google refreshes it. May happen in each half an hour if you are changing frequently or it may stay in the pool. For my case it was almost half an hour to take effect.
    0 讨论(0)
  • 2020-11-22 03:24

    The redirect url is case sensitive.

    In my case I added both: http://localhost:5023/AuthCallback/IndexAsync http://localhost:5023/authcallback/indexasync

    0 讨论(0)
  • 2020-11-22 03:24

    None of the above solutions worked for me. below did

    change authorised Redirect urls to - https://localhost:44377/signin-google

    Hope this helps someone.

    0 讨论(0)
  • 2020-11-22 03:24

    beware of the extra / at the end of the url http://localhost:8000 is different from http://localhost:8000/

    0 讨论(0)
  • 2020-11-22 03:26

    The redirect URI (where the response is returned to) has to be registered in the APIs console, and the error is indicating that you haven't done that, or haven't done it correctly.

    Go to the console for your project and look under API Access. You should see your client ID & client secret there, along with a list of redirect URIs. If the URI you want isn't listed, click edit settings and add the URI to the list.

    EDIT: (From a highly rated comment below) Note that updating the google api console and that change being present can take some time. Generally only a few minutes but sometimes it seems longer.

    0 讨论(0)
提交回复
热议问题