Skip to content

Commit 86a7a43

Browse files
authored
Fix AAD/B2C message shown on SignUp page error (#1687)
Implementation inspired by #1621 Co-authored-by: Jonas Anker Rasmussen <[email protected]>
1 parent cbb6a92 commit 86a7a43

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/components/users/signup-social/ko/signupSocial.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<signup-social-runtime data-bind="attr: { params: runtimeConfig }"></signup-social-runtime>
33
<!-- /ko -->
44

5-
<!-- ko ifnot: identityProvider && (mode === "publishing") -->
5+
<!-- ko if: showNoAadConfigMessage -->
66
<div class="not-configured">This widget will display a sign-up form when you configure <a
77
href="https://aka.ms/apim-how-to-aad" target="_blank">Azure Active Directory</a> or<a
88
href="https://aka.ms/apim-how-to-aadb2c" target="_blank">Azure Active Directory B2C</a> integration in your API

src/components/users/signup-social/ko/signupSocialViewModel.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ export class SignupSocialViewModel {
1010
public readonly identityProvider: ko.Observable<boolean>;
1111
public readonly mode: ko.Observable<string>;
1212
public readonly runtimeConfig: ko.Observable<string>;
13+
public readonly showNoAadConfigMessage: ko.Computed<boolean>;
1314

1415
constructor() {
1516
this.identityProvider = ko.observable<boolean>();
1617
this.mode = ko.observable<string>();
1718
this.runtimeConfig = ko.observable<string>();
19+
this.showNoAadConfigMessage = ko.computed<boolean>(() => !this.identityProvider() && this.mode() !== "publishing");
1820
}
1921
}

0 commit comments

Comments
 (0)