Skip to content

Commit

Permalink
Add docs for sign_in_with_id_token
Browse files Browse the repository at this point in the history
  • Loading branch information
Proziam committed Oct 21, 2024
1 parent bedf571 commit c99d1df
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,19 @@ impl AuthClient {
Ok(user)
}

// TODO: Add test
/// Allows signing in with an OIDC ID token. The authentication provider used should be enabled and configured.
/// # Example
/// ```
/// let credentials = IdTokenCredentials {
/// provider: Provider::Github,
/// token: "<id-token-from-auth-provider>",
/// };
///
/// let session = auth_client
/// .sign_in_with_id_token(credentials)
/// .await
/// .unwrap();
/// ```
pub async fn sign_in_with_id_token(
&self,
credentials: IdTokenCredentials,
Expand Down

0 comments on commit c99d1df

Please sign in to comment.