Skip to main content

accept_oauth_code

Function accept_oauth_code 

Source
pub async fn accept_oauth_code(
    listener: TcpListener,
    expected_state: &str,
    timeout: Duration,
) -> Result<String, OAuthError>
Expand description

Wait on listener for the provider’s redirect and return the code once a request arrives whose state matches expected_state. Serves a tiny “you can close this tab” page; ignores non-callback hits (e.g. favicon).