Skip to main content

github_poll_for_token

Function github_poll_for_token 

Source
pub async fn github_poll_for_token(
    client: &Client,
    client_id: &str,
    device_code: &str,
    timeout_secs: u64,
) -> Result<DeviceFlowResult, OAuthError>
Expand description

Step 2: Poll GitHub for the access token.

timeout_secs caps total polling duration. Returns DeviceFlowResult::Success once the user authorizes, Pending if still waiting, or Rejected on error.