Method PollAsync
PollAsync(string, string, CancellationToken)
Gets the status of a link for the new device, or returns null if the link is unknown or expired, or the poll secret is wrong. Once the link is approved, the status contains a one-time sign-in code bound to the link's code challenge.
Declaration
public Task<DeviceLinkPollResult?> PollAsync(string id, string pollSecret, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The link ID from Id. |
| string | pollSecret | The poll secret from PollSecret. |
| CancellationToken | cancellationToken | A token to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<DeviceLinkPollResult> |
Remarks
Every poll after approval gets the same sign-in code, so the new device can poll again if a response does not reach it. The code can be redeemed once, and only with the new device's code verifier. It is valid for as long as the link can be polled, and for at least the lifetime of sign-in codes (see Lifetime).