Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit 218c738

Browse files
committed
Updated to b2clogin authority
1 parent fc95516 commit 218c738

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

MSALiOSB2C/ViewController.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,13 @@ class ViewController: UIViewController, UITextFieldDelegate, URLSessionDelegate
6767
The scheme part, i.e. "msal<your-client-id-here>", needs to be registered in the info.plist of the project
6868
*/
6969

70-
let authority = try self.getAuthority(forPolicy: self.kSignupOrSigninPolicy)
71-
72-
let b2cAuthority = try MSALB2CAuthority(url: authority)
70+
let siginPolicyAuthority = try self.getAuthority(forPolicy: self.kSignupOrSigninPolicy)
71+
let editProfileAuthority = try self.getAuthority(forPolicy: self.kEditProfilePolicy)
7372

7473
// Provide configuration for MSALPublicClientApplication
7574
// MSAL will use default redirect uri when you provide nil
76-
let pcaConfig = MSALPublicClientApplicationConfig(clientId: kClientID, redirectUri: nil, authority: b2cAuthority)
77-
pcaConfig.knownAuthorities = b2cAuthority
75+
let pcaConfig = MSALPublicClientApplicationConfig(clientId: kClientID, redirectUri: nil, authority: siginPolicyAuthority)
76+
pcaConfig.knownAuthorities = [siginPolicyAuthority, editProfileAuthority]
7877
self.application = try MSALPublicClientApplication(configuration: pcaConfig)
7978
} catch {
8079
self.updateLoggingText(text: "Unable to create application \(error)")

0 commit comments

Comments
 (0)