Skip to content

Commit 80843bc

Browse files
Updated relyingPartyID to be non-optional (#57)
1 parent 6ff1b6c commit 80843bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/WebAuthn/Ceremonies/Authentication/PublicKeyCredentialRequestOptions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public struct PublicKeyCredentialRequestOptions: Encodable {
3636
///
3737
/// This is configured on ``WebAuthnManager`` before its ``WebAuthnManager/beginAuthentication(timeout:allowCredentials:userVerification:)`` method is called.
3838
/// - Note: When encoded, this field appears as `rpId` to match the expectations of `navigator.credentials.get()`.
39-
public let relyingPartyID: String?
39+
public let relyingPartyID: String
4040

4141
/// Optionally used by the client to find authenticators eligible for this authentication ceremony.
4242
public let allowCredentials: [PublicKeyCredentialDescriptor]?
@@ -51,7 +51,7 @@ public struct PublicKeyCredentialRequestOptions: Encodable {
5151

5252
try container.encode(challenge.base64URLEncodedString(), forKey: .challenge)
5353
try container.encodeIfPresent(timeout?.milliseconds, forKey: .timeout)
54-
try container.encodeIfPresent(relyingPartyID, forKey: .rpID)
54+
try container.encode(relyingPartyID, forKey: .rpID)
5555
try container.encodeIfPresent(allowCredentials, forKey: .allowCredentials)
5656
try container.encodeIfPresent(userVerification, forKey: .userVerification)
5757
}

0 commit comments

Comments
 (0)