pub struct AuthClient { /* private fields */ }Implementations§
Source§impl AuthClient
impl AuthClient
pub fn new(providers: Vec<(String, AuthConfig)>) -> Self
pub fn with_vercel(self, url: String) -> Self
Trait Implementations§
Source§impl AuthHandle for AuthClient
impl AuthHandle for AuthClient
fn current_user(&self) -> Option<User>
fn bearer_token(&self) -> Option<String>
fn sign_in(&self, provider: &str) -> Result<User, Box<dyn Error>>
Source§fn start_sign_in(&self, provider: &str) -> Result<(), Box<dyn Error>>
fn start_sign_in(&self, provider: &str) -> Result<(), Box<dyn Error>>
Start a non-blocking sign-in. Returns immediately.
Call
drain_pending_sign_in periodically to get the result.fn drain_pending_sign_in(&self) -> Option<Result<User, Box<dyn Error>>>
Source§fn auth_message(&self) -> Option<String>
fn auth_message(&self) -> Option<String>
A user-facing message about an ongoing auth flow (e.g. “Enter code XXXXX”).
fn sign_out(&self)
Auto Trait Implementations§
impl Freeze for AuthClient
impl RefUnwindSafe for AuthClient
impl Send for AuthClient
impl Sync for AuthClient
impl Unpin for AuthClient
impl UnsafeUnpin for AuthClient
impl UnwindSafe for AuthClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more