注销后ADFS 2016 oAuth不会重定向到登录页面

编程入门 行业动态 更新时间:2024-10-25 02:23:44
本文介绍了注销后ADFS 2016 oAuth不会重定向到登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在ADFS 2016上遇到一个奇怪的问题. 我有一个使用ng2-adal js处理应用程序的身份验证和授权的Angular应用程序. 用户从应用程序注销时,他们不会重定向回到登录页面. 我在事件查看器中为ADFS启用了调试跟踪,错误是:

I'm having a strange problem on ADFS 2016. I have an Angular application that uses ng2-adal js to handle authentication and authorization of the application. When users logout from the application, they are not redirected back to the login page. I enabled debug traces in Event Viewer for ADFS and the error is:

OAuthSignoutProtocolHandler.ValidatePostLogoutRedirectUri:验证结果:False. RedirectUrl: localhost:4200/login

OAuthSignoutProtocolHandler.ValidatePostLogoutRedirectUri: Validation result: False. RedirectUrl: localhost:4200/login

指定的重定向URL与任何OAuth客户端的重定向URI不匹配.注销成功,但客户端将不会重定向.

URL: localhost:4200/login

URL: localhost:4200/login

我使用了ADFS 2016应用程序组,在那里我的本地客户端具有此重定向URL.如果不存在URL,则用户将无法首先登录.

I have used the ADFS 2016 Application Groups, there i have my Native Client with this Redirect URL. If URL didn't exist users wouldn't be able to login in the first place.

非常感谢您的帮助.

推荐答案

基于此github问题: github/AzureAD/azure-activedirectory- library-for-js/issues/677

Based on this github issue: github/AzureAD/azure-activedirectory-library-for-js/issues/677

我能够注销并通过在注销url中添加id_token_hint作为url参数来重定向回登录.

I was able to logout and redirect back to login by adding the id_token_hint as an url parameter in the logout url.

id_token_hint的值必须是ADFS收到的令牌.它存储在SessionStorage中(默认情况下),可以像这样读取 sessionStorage.getItem('adal.idtoken')

The value of id_token_hint has to be the token received by ADFS. It is stored in SessionStorage (by default) and can be read like sessionStorage.getItem('adal.idtoken')

更多推荐

注销后ADFS 2016 oAuth不会重定向到登录页面

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

发布评论

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

>www.elefans.com

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