简体   繁体   English

如何使用Azure Active Directory身份验证库对Angularjs应用程序进行身份验证?

[英]How to authenticate Angularjs application using Azure Active Directory Authentication Library?

I have an web application with AngularJS front-end & spring REST back end.I have to use Azure AD for authentication. 我有一个带有AngularJS前端和Spring REST后端的Web应用程序。我必须使用Azure AD进行身份验证。 At login page when I enter credentials, it takes me to Azure & asks me to enter credentials,upon doing it I get the message: 在登录页面,当我输入凭据时,它将我带到Azure并要求我输入凭据,在执行此操作时,我收到消息:

AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: 'xxxx-xxx-xxxx-xxxx-xxxx'. AADSTS50011:请求中指定的回复URL与为应用程序配置的回复URL不匹配:'xxxx-xxx-xxxx-xxxx-xxxx'。

The page form which the request was made was: 请求的页面形式是:

https://xxx.xxxx.com/App/#/login https://xxx.xxxx.com/App/#/login

Whereas the replyUrl specified in Azure for that application was: 而在Azure中为该应用程序指定的replyUrl是:

https://xxx.xxxx.com/App/#/ https://xxx.xxxx.com/App/#/

Do I have to make both urls same ie https://xxx.xxxx.com/App/#/login 我是否必须使两个网址相同,即https://xxx.xxxx.com/App/#/login

My initialization code for ADAL is: 我的ADAL初始化代码是:

adalProvider.init({
        instance: 'https://login.microsoftonline.com/', 
        tenant: 'xxxxxxxx.onmicrosoft.com',
        clientId: 'xxxxxxxxxxxxxxxxxxxxx',
        popUp: false,

    },
    $httpProvider
    );  

Even after making replyTo url identical to the url of the page from where request was made, still I get the same error. 即使在回复之后,url与请求发出的页面的url相同,但仍然会出现相同的错误。

Do I have to make both urls same ie https://xxx.xxxx.com/App/#/login 我是否必须使两个网址相同,即https://xxx.xxxx.com/App/#/login

In short: yes. 简而言之:是的。

There is a lot of information to be found about this error online . 有关此错误的在线信息很多

InvalidReplyTo - The reply address is missing, misconfigured, or does not match reply addresses configured for the app. InvalidReplyTo - 回复地址丢失,配置错误或与应用程序配置的回复地址不匹配。 As a resolution ensure to add this missing reply address to the Azure Active Directory application or have someone with the permissions to manage your application in Active Directory do this for you. 作为解决方案,确保将此缺少的回复地址添加到Azure Active Directory应用程序,或者让具有在Active Directory中管理应用程序的权限的人员为您执行此操作。

Taken from Authentication and authorization error codes 取自身份验证和授权错误代码

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Angularjs不通过Azure Active Directory进行身份验证 - Angularjs doesn't authenticate with Azure Active Directory AngularJS 组件和 ADAL(用于 JS 的 Active Directory Azure 库) - AngularJS Components and ADAL (Active Directory Azure Library for JS) 使用 Active Directory(使用 LDAP)在 angularjs/javascript 前端进行身份验证 - 流程的流程应该是什么? - Using Active Directory (with LDAP) to authenticate on an angularjs/javascript fronted - what should the flow of the process be? 使用Angular.JS Active Directory身份验证的ASP.NET MVC4应用程序 - ASP.NET MVC4 application using Angular.JS Active Directory Authentication 使用Active Directory身份验证在JavaScript中调用Azure API App - Make API call to Azure API App in JavaScript with Active Directory authentication 在不使用“路由”的情况下使用AngularJS刷新单页应用程序时如何验证登录用户? - How to authenticate logged in user when refreshing single page application using AngularJS without “Routing”? 无法获得Angular SPA来使用Azure Active Directory验证ASP.NET MVC WebAPI - Cannot get an Angular SPA to authenticate an ASP.NET MVC WebAPI with Azure Active Directory 身份验证期间刷新AngularJS SPA应用程序Azure AD - AngularJS SPA Application Azure AD refresh during Authentication 如何保护不使用身份验证的AngularJS应用程序? - How to secure an AngularJS application that does not use authentication? 如何在angularjs中使用url进行身份验证 - how to authenticate with url in angularjs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM