OAuth授权成功后,重定向页面不会自动关闭 [英] Redirect page doesn't automatically close after successful OAuth authorization

查看:110
本文介绍了OAuth授权成功后,重定向页面不会自动关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遵循以下教程:

I am following the below tutorial: https://docs.microsoft.com/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项目.我遵循了

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授权成功后,重定向页面不会自动关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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