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

Commit b4f1494

Browse files
authored
Update README.md
1 parent f7fcacb commit b4f1494

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,32 @@ The MSAL library for iOS and macOS gives your app the ability to begin using the
2424
## Example
2525

2626
```swift
27-
do {
28-
// Create an instance of MSALPublicClientApplication with proper config
29-
let authority = try MSALB2CAuthority(url: URL(string: "<your-authority-here>")!)
30-
let pcaConfig = MSALPublicClientApplicationConfig(clientId: "<your-client-id-here>", redirectUri: nil, authority: authority)
31-
let application = try MSALPublicClientApplication(configuration: pcaConfig)
27+
do {
28+
// Create an instance of MSALPublicClientApplication with proper config
29+
let authority = try MSALB2CAuthority(url: URL(string: "<your-authority-here>")!)
30+
let pcaConfig = MSALPublicClientApplicationConfig(clientId: "<your-client-id-here>", redirectUri: nil, authority: authority)
31+
let application = try MSALPublicClientApplication(configuration: pcaConfig)
3232

33-
let viewController = self /*replace with your main presentation controller here */
34-
let webViewParameters = MSALWebviewParameters(parentViewController: viewController)
35-
let interactiveParameters = MSALInteractiveTokenParameters(scopes: ["<enter-your-scope-here>"], webviewParameters: webViewParameters)
33+
let viewController = self /*replace with your main presentation controller here */
34+
let webViewParameters = MSALWebviewParameters(parentViewController: viewController)
35+
let interactiveParameters = MSALInteractiveTokenParameters(scopes: ["<enter-your-scope-here>"], webviewParameters: webViewParameters)
3636

37-
application.acquireToken(with: interactiveParameters) { (result, error) in
37+
application.acquireToken(with: interactiveParameters) { (result, error) in
3838

39-
guard let result = result else {
40-
print(error!) /* MSAL token acquisition failed, check error information */
41-
return
39+
guard let result = result else {
40+
print(error!) /* MSAL token acquisition failed, check error information */
41+
return
4242
}
4343

4444
let accessToken = result.accessToken
4545
let account = result.account
4646
/* MSAL token acquisition succeeded, use access token or check account */
4747

48-
}
49-
}
50-
catch {
51-
print(error) /* MSALPublicClientApplication creation failed, check error information */
52-
}
48+
}
49+
}
50+
catch {
51+
print(error) /* MSALPublicClientApplication creation failed, check error information */
52+
}
5353
```
5454

5555
## App Registration
@@ -141,4 +141,4 @@ This library controls how users sign-in and access services. We recommend you al
141141

142142
If you find a security issue with our libraries or services please report it to [[email protected]](mailto:[email protected]) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.
143143

144-
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License");
144+
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the "License");

0 commit comments

Comments
 (0)