Trait GetMagicAuth

Source
pub trait GetMagicAuth {
    // Required method
    fn get_magic_auth<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 MagicAuthId,
    ) -> Pin<Box<dyn Future<Output = WorkOsResult<MagicAuth, GetMagicAuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Required Methods§

Source

fn get_magic_auth<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 MagicAuthId, ) -> Pin<Box<dyn Future<Output = WorkOsResult<MagicAuth, GetMagicAuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the details of an existing Magic Auth code that can be used to send an email to a user for authentication.

WorkOS Docs: Get a Magic Auth code

§Examples
use workos_sdk::{ApiKey, WorkOs};

let workos = WorkOs::new(&ApiKey::from("sk_example_123456789"));

let magic_auth = workos
    .user_management()
    .get_magic_auth(&MagicAuthId::from("magic_auth_01E4ZCR3C56J083X43JQXF3JK5"))
    .await?;

Implementors§