Skip to content

Commit 15d7672

Browse files
committed
Change the default timeout to 5 mins
1 parent 331374f commit 15d7672

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/WebAuthn/WebAuthnManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ public struct WebAuthnManager {
5151
/// - Parameters:
5252
/// - user: The user to register.
5353
/// - timeout: How long the browser should give the user to choose an authenticator. This value
54-
/// is a *hint* and may be ignored by the browser. Defaults to 60 seconds.
54+
/// is a *hint* and may be ignored by the browser. Defaults to 300000 milliseconds (5 minutes).
5555
/// - attestation: The Relying Party's preference regarding attestation. Defaults to `.none`.
5656
/// - publicKeyCredentialParameters: A list of public key algorithms the Relying Party chooses to restrict
5757
/// support to. Defaults to all supported algorithms.
5858
/// - Returns: Registration options ready for the browser.
5959
public func beginRegistration(
6060
user: PublicKeyCredentialUserEntity,
61-
timeout: Duration? = .seconds(3600),
61+
timeout: Duration? = .milliseconds(300000),
6262
attestation: AttestationConveyancePreference = .none,
6363
publicKeyCredentialParameters: [PublicKeyCredentialParameters] = .supported
6464
) -> PublicKeyCredentialCreationOptions {

0 commit comments

Comments
 (0)