OAuth授权成功后,重定向页面不会自动关闭

编程入门 行业动态 更新时间:2024-10-23 13:23:38
本文介绍了OAuth授权成功后,重定向页面不会自动关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在遵循以下教程: docs.microsoft/zh-CN/azure/app-service-mobile/app-service-mobile-windows-store-dotnet-get-started-用户.我设置了OAuth(通过Google)并创建了Windows 10应用. 当我单击身份验证"按钮时,它将带我到Google网站并进行身份验证.然后它将我重定向到一个快乐的页面.这个快乐的页面没有按钮.关闭快乐页面会给我一个[用户取消登录异常].此后无法继续进行.我在这里想念什么?

I am following the below tutorial: docs.microsoft/en-us/azure/app-service-mobile/app-service-mobile-windows-store-dotnet-get-started-users . I set up the OAuth (via Google) and the created the windows 10 app. When I click on authenticate button, it takes me to Google site and authenticates me. Then it redirects me to a happy page. This happy page has not buttons. Closing the happy page gives me a [User cancelled login exception]. There is no way to proceed ahead after this. What am I missing here?

推荐答案

我设置了OAuth(通过Google)并创建了Windows 10应用.当我单击身份验证"按钮时,它将带我到Google网站并进行身份验证.然后它将我重定向到一个快乐的页面.这个快乐的页面没有按钮.关闭快乐页面会给我一个[用户取消登录异常].

I set up the OAuth (via Google) and the created the windows 10 app. When I click on authenticate button, it takes me to Google site and authenticates me. Then it redirects me to a happy page. This happy page has not buttons. Closing the happy page gives me a [User cancelled login exception].

据我了解,您正在创建一个UWP项目.我遵循了向您的Windows应用添加身份验证和将应用程序服务配置为使用Google登录,然后我下载了快速入门项目来检查此问题.我可以使用我的Google帐户成功登录,如下所示:

Per my understanding, you are creating a UWP project. I followed Add authentication to your Windows app and Configure App Service to use Google login, then I download the quick start project to check this issue. I could login successfully with my Google account as follows:

这是我的代码示例,您可以参考 AzureMobileApp-UWP .

Here is my code sample, you could refer to AzureMobileApp-UWP.

更多推荐

OAuth授权成功后,重定向页面不会自动关闭

本文发布于:2023-11-15 03:46:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1590859.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自动关闭   重定向   页面   OAuth

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!