Skip to content

Commit b986a22

Browse files
Tyler WhitneyTyler Whitney
authored andcommitted
incorp feedback
1 parent f68a554 commit b986a22

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

articles/active-directory/develop/single-sign-on-macos-ios.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ When you have the entitlements set up correctly, you'll see a `entitlements.plis
9494
</plist>
9595
```
9696

97+
#### Add a new keychain group
98+
99+
Add a new keychain group to your project **Capabilities**. The keychain group should be:
100+
* `com.microsoft.adalcache` on iOS
101+
* `com.microsoft.identity.universalstorage` on macOS.
102+
103+
![keychain example](media/single-sign-on-macos-ios/keychain_example.png)
104+
105+
For more information, see [keychain groups](howto-v2-keychain-objc.md).
106+
107+
## Configure the application object
108+
97109
Once you have the keychain entitlement enabled in each of your applications, and you're ready to use SSO, configure `MSALPublicClientApplication` with your keychain access group as in the following example:
98110

99111
Objective-C:
@@ -111,17 +123,15 @@ Swift:
111123
```swift
112124
let config = MSALPublicClientApplicationConfig(clientId: "<my-client-id>")
113125
config.cacheConfig.keychainSharingGroup = "my.keychain.group"
114-
126+
115127
do {
116-
let application = try MSALPublicClientApplication(configuration: config)
117-
// continue on with application
128+
let application = try MSALPublicClientApplication(configuration: config)
129+
// continue on with application
118130
} catch let error as NSError {
119131
// handle error here
120-
}
132+
}
121133
```
122134

123-
124-
125135
> [!WARNING]
126136
> When you share a keychain across your applications, any application can delete users or even all of the tokens across your application.
127137
> This is particularly impactful if you have applications that rely on tokens to do background work.
@@ -205,16 +215,6 @@ func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)
205215
}
206216
```
207217

208-
## Add a new keychain group
209-
210-
Add a new keychain group to your project **Capabilities**. The keychain group should be:
211-
* `com.microsoft.adalcache` on iOS
212-
* `com.microsoft.identity.universalstorage` on macOS.
213-
214-
![](media/single-sign-on-macos-ios/keychain_example.png)
215-
216-
For more information, see [keychain groups](howto-v2-keychain-objc.md).
217-
218218
## Next steps
219219

220-
Learn more about [Authentication flows and application scenarios](authentication-flows-app-scenarios.md)
220+
Learn more about [Authentication flows and application scenarios](authentication-flows-app-scenarios.md)

0 commit comments

Comments
 (0)