Skip to content

Commit

Permalink
Ignore domain hint on iOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartwesselink committed Jan 2, 2023
1 parent e3b02e2 commit 9fe5abd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class MsAuthPluginTest {
public static final String KEY_HASH = "cmFuZG9tLWtleS1oYXNoLW9idGFpbmVkLWZyb20tYXp1cmU=";
public static final String TENANT = "f6785b1e-7ae8-4c41-8b72-d418f03cc1d7";
public static final String CLIENT_ID = "3892f330-5945-4db6-9167-4d5e644ab840";
public static final String DOMAIN_HINT = "recognize.nl";
public static final String ID_TOKEN =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c";

Expand Down
7 changes: 6 additions & 1 deletion ios/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ public class MsAuthPlugin: CAPPlugin {
do {
let authority = authorityType == .aad
? try MSALAADAuthority(url: authorityURL) : try MSALB2CAuthority(url: authorityURL)
let msalConfiguration = MSALPublicClientApplicationConfig(clientId: clientId, domainHint: domainHint, redirectUri: nil, authority: authority)

if (domainHint != nil) {
print("Warning: domain hint is currently not supported on iOS.")
}

let msalConfiguration = MSALPublicClientApplicationConfig(clientId: clientId, redirectUri: nil, authority: authority)
msalConfiguration.knownAuthorities = [authority]
return try MSALPublicClientApplication(configuration: msalConfiguration)
} catch {
Expand Down
12 changes: 6 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- Capacitor (3.2.2):
- Capacitor (4.3.0):
- CapacitorCordova
- CapacitorCordova (3.2.2)
- CapacitorCordova (4.3.0)
- MSAL (1.1.19):
- MSAL/app-lib (= 1.1.19)
- MSAL/app-lib (1.1.19)
Expand All @@ -22,10 +22,10 @@ EXTERNAL SOURCES:
:path: "../node_modules/@capacitor/ios"

SPEC CHECKSUMS:
Capacitor: aa4514ca225c6818f269d5c5d4d010d6eddddde7
CapacitorCordova: bdb13b0c6c1d51f5a421a59b78222b24e852d826
Capacitor: 5534f805df231c76164e1d63119bff7b4eac6cd5
CapacitorCordova: 19a82a3b91fbeb9bdd049729551edc3cd7e5e648
MSAL: 0a4993a743aa45147c78c698e0412d00cb005c1a

PODFILE CHECKSUM: 42bf7b15755196452a35e4da759c35bbca9bfc3d
PODFILE CHECKSUM: f6274e5f60bf7be2dab2cca23d5c22f5d9f33c9e

COCOAPODS: 1.10.1
COCOAPODS: 1.11.2

0 comments on commit 9fe5abd

Please sign in to comment.