How to add or change return uri in google console for oAuth2

岁酱吖の 提交于 2019-11-30 22:49:27

问题


I want to use google oAuth from my webservice i have created new oAuth key but when I use it i get

Error: redirect_uri_mismatch
The redirect URI in the request: www.blabla.com
did not match a registered redirect URI

Now, where to find the registered redirect URI to change it, or where can I add another one. Under "API Access" menu of the console I can only "Edit brand information", "Create Another Client ID" and "Edit allowed domains", but I don't have permissions to add one.


回答1:


My problem was that I have created an Client ID for "Service account". And didn't even tried the wizard for "Web application". Because my controller was making a web request the Web Application option is the right one. Silly me.

Under the Web Application Client ID settings you can adjust the return uri, and Service Account settings don't have that option.




回答2:


It is not immediately apparent as to where to do this in my opinion, so here are some useful screenshots.

1) Navigate to the Credentials screen... something like "https://console.developers.google.com/apis/credentials...."

2) Click on your 'Oauth 2 client I.D.' link.. in this case it is "Web client 1"

2) At the bottom of the screen you can add your site url like - "http://localhost:[some number]/signin-google" and save.




回答3:


There's an 'Edit settings' to the right of your client ID. Click it and there will be a popup allowing you to edit authorized redirect URIs.



来源:https://stackoverflow.com/questions/16693653/how-to-add-or-change-return-uri-in-google-console-for-oauth2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!