Method RedeemAsync
RedeemAsync(string, string, CancellationToken)
Redeems a sign-in code and returns the ID of the user it signs in and the app's value it was created with, or null if the code is unknown, expired or already used, or the code verifier does not match the code's challenge.
Declaration
public Task<RedeemedSignInCode?> RedeemAsync(string code, string codeVerifier, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | code | The sign-in code. |
| string | codeVerifier | The PKCE code verifier that matches the challenge the code was created with. |
| CancellationToken | cancellationToken | A token to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<RedeemedSignInCode> |
Remarks
Redeeming uses the code up whether or not the verifier matches, so a code that reached the wrong party can be tried only once.