错误:redirect_uri_mismatch(ASP.NET MVC) [英] Error: redirect_uri_mismatch (ASP.NET MVC)

查看:85
本文介绍了错误:redirect_uri_mismatch(ASP.NET MVC)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试让用户使用GOOGLE登录时出现以下错误

I am getting the following error when trying to let user login using GOOGLE

我尝试了很多事情,但没有任何效果

I have tried so many things and nothing works

我最初使用以下代码

app.UseGoogleAuthentication(clientId: "APIKEY.apps.googleusercontent.com",
            clientSecret: "SECRET-K");

我还尝试了以下方法

app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
            {
                ClientId = "APIKEY.apps.googleusercontent.com",
                ClientSecret = "SECRET-K",
                CallbackPath = new PathString("/signin-google")
            });

一点都没有运气,

我的Web应用程序客户端ID设置如下

My Client ID for Web application is set up as following

我不知道我在做什么错

有人遇到这个问题并对此有解决方案

Have anyone faced this issue and have a solution for this

高度赞赏

欢呼

推荐答案

Google开发者控制台在重定向URI的末尾删除/.

Google developer console remove the / at the end of your redirect URI.

重定向URI必须与发送它的位置完全匹配.

Redirect URI must match exactly the location you are sending it from.

这篇关于错误:redirect_uri_mismatch(ASP.NET MVC)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆