[英]Execute user flow on Azure B2C with Angular SPA MSAL library
I have setup a Azure B2C for experimenting, and have created a signupandsign as a user flow.我已经设置了一个 Azure B2C 进行实验,并创建了一个注册和签名作为用户流程。
I've followed the github samples on how to use the MSAL library from Angular 2+ and have as a result got this format:我遵循了 github 示例,了解如何使用 Angular 2+ 中的 MSAL 库,结果得到了这种格式:
export const protectedResourceMap: [string, string[]][] = [
['https://graph.microsoft.com/v1.0/me', ['user.read']],
];
function MSALConfigFactory(): Configuration {
return {
auth: {
clientId: environment.clientId,
authority: environment.authority,
validateAuthority: true,
redirectUri: environment.redirectUrl,
postLogoutRedirectUri: environment.redirectUrl,
navigateToLoginRequestUrl: true,
},
cache: {
storeAuthStateInCookie: false, // set to true for IE 11
},
};
}
function MSALAngularConfigFactory(): MsalAngularConfiguration {
return {
popUp: false,
protectedResourceMap
};
}
export const environment = {
production: false,
clientId: '22ccxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
authority: 'https://login.microsoftonline.com/bc5xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/',
redirectUrl: 'http://localhost:4200'
};
But all it does it take to sign in page, doesn't give me any options for sign up.但是登录页面所需的一切,并没有给我任何注册选项。 How do i trigger the signupandsign user flow from my Angular SPA?
如何从我的 Angular SPA 触发 signupandsign 用户流程?
The sample which you are referring helps you to Sign in users and call the Microsoft Graph API from an Angular single-page application.您所指的示例可帮助您登录用户并从 Angular 单页应用程序调用 Microsoft Graph API。
In the document you can see below note which points you to the tutorial在文档中,您可以看到下面的注释,它指向教程
Note: A more detailed tutorial covering this sample can be found here.
Please refer the Sample for B2C Angular SPA.请参阅 B2C Angular SPA 的示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.