Class SignInCodes
Creates and redeems one-time sign-in codes. A code is bound to a PKCE code challenge, so only the holder of the matching code verifier can exchange it for a session, wherever the code travels (a redirect to an app, a device link or a response that could be intercepted).
Namespace: Singulink.Net.Http.Api.Service.SignIn
Assembly: Singulink.Net.Http.Api.Service.dll
Syntax
public sealed class SignInCodes
Remarks
Every way of signing in can end the same way: the client sends a code challenge when it starts signing in, the step that verifies the user (a passkey, a password, an approved device link) creates a code bound to that challenge with CreateAsync(string, string, string?, CancellationToken) and returns it, and the client exchanges it for a session with its code verifier through an endpoint that calls SignInAsync<TSessionToken>(SessionContext<TSessionToken>, RedeemSignInCodeCommand, Func<RedeemedSignInCode, SignInInfo, Task<TSessionToken>>, CancellationToken).
Codes are kept in the registered IShortLivedStore.
Constructors
| Name | Description |
|---|---|
| SignInCodes(IShortLivedStore, IOptions<SignInCodeOptions>, ILogger<SignInCodes>) | Initializes a new instance of the SignInCodes class. |