From c8beda65e91726167551e026dc29ea14b6940242 Mon Sep 17 00:00:00 2001
From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com>
Date: Wed, 14 Aug 2024 18:31:14 +0300
Subject: [PATCH] Add hints to `RegisterOptions` (#147)
---
src/Passwordless/Models/RegisterOptions.cs | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/Passwordless/Models/RegisterOptions.cs b/src/Passwordless/Models/RegisterOptions.cs
index bdc7aeb..6257151 100644
--- a/src/Passwordless/Models/RegisterOptions.cs
+++ b/src/Passwordless/Models/RegisterOptions.cs
@@ -34,25 +34,34 @@ public record RegisterOptions(string UserId, string Username)
public bool? Discoverable { get; init; }
///
- /// Allows choosing preference for requiring User Verification
- /// (biometrics, pin code etc) when authenticating Can be "preferred" (default), "required" or "discouraged".
+ /// Allows choosing preference for requiring User Verification (biometrics, pin code etc) when authenticating.
+ /// Can be "preferred" (default), "required" or "discouraged".
///
public string? UserVerification { get; init; }
///
- /// Timestamp (UTC) when the registration token should expire. By default, current time + 120 seconds.
+ /// Timestamp (UTC) when the registration token should expire.
+ /// By default, current time + 120 seconds.
///
public DateTime? ExpiresAt { get; init; }
///
- /// A array of aliases for the userId, such as an email or username. Used to initiate a
+ /// An array of aliases for the userId, such as an email or username. Used to initiate a
/// signin on the client side with the signinWithAlias() method. An alias must be unique to the userId.
/// Defaults to an empty array [].
///
public HashSet Aliases { get; init; } = [];
///
- /// Whether aliases should be hashed before being stored. Defaults to true.
+ /// Whether aliases should be hashed before being stored.
+ /// Defaults to true.
///
public bool? AliasHashing { get; init; }
+
+ ///
+ /// Hints used to communicate to the user agent about how the request may be best completed.
+ /// Can be "security-key", "client-device", "hybrid".
+ /// Defaults to an empty array [].
+ ///
+ public IReadOnlyList Hints { get; init; } = [];
}
\ No newline at end of file