Skip to content
This repository was archived by the owner on Feb 11, 2023. It is now read-only.

Commit d2d4939

Browse files
authored
Update Plugin.swift
1 parent 54d79aa commit d2d4939

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/msal-capacitor-plugin/ios/Plugin/Plugin.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,20 @@ public class MsalPlugin: CAPPlugin {
4646
self.msalUseBiometrics = isoOptions["enableBiometrics"] as! Bool;
4747
}
4848

49+
var tokenCache = ""
50+
4951
#if os(iOS)
50-
let tokenCache = isoOptions["tokenCache"] as! String ?? "com.microsoft.adalcache"
52+
if isoOptions["tokenCache"] == nil {
53+
tokenCache = "com.microsoft.adalcache"
54+
} else {
55+
tokenCache = isoOptions["tokenCache"] as! String
56+
}
5157
#else
52-
let tokenCache = iosOptions["tokenCache"] as! String ?? "com.microsoft.identity.universalstorage"
58+
if isoOptions["tokenCache"] == nil {
59+
tokenCache = "com.microsoft.identity.universalstorage"
60+
} else {
61+
tokenCache = isoOptions["tokenCache"] as! String
62+
}
5363
#endif
5464
clientConfiguration.cacheConfig.keychainSharingGroup = tokenCache
5565
} else {

0 commit comments

Comments
 (0)