在 owin security 中,我在哪里修改 'signin-google' 以实现 google 重定向 url?

where do i modify 'signin-google' in owin security for google redirect url?

我正在使用 google oauth 登录 asp mvc 5, 我按照教程安装 owin security 并将 google 重定向 url 设置为 localhost/myapp/signin-google,

我的问题是在哪里可以将 localhost/myapp/signin-google 更改为 localhost/myapp/mycallback 之类的其他内容?

我尝试更改为 localhost/myapp/signup/ExternalLoginCallback 实际操作,但它没有用,是 'signin-google' 在 owin 安全中硬编码吗??

Adem 是对的。以下是您如何更改它:

var options = new GoogleOAuth2AuthenticationOptions
{
    ClientId = "Your Client ID",
    ClientSecret = "Your Client Secret",
    CallbackPath = new PathString("/myapp/mycallback")
};
app.UseGoogleAuthentication(options);

请参阅此link了解更多详情。