Skip to main content

link_platform

Function link_platform 

Source
pub async fn link_platform<F, Fut>(
    credentials: &Credentials,
    integration: Platform,
    return_to: &str,
    open: F,
) -> Result<LinkOutcome>
where F: FnOnce(String) -> Fut, Fut: Future<Output = String>,
Expand description

Links integration and answers how the link ended. open gets the page to open (the provider’s consent page, or Fauna’s own form) and returns the URL the browser landed back on, return_to (a page on a site Fauna trusts) with the link’s state and, when an account came back, a one time claim in its fragment, which links the account with these credentials (finish_link). Whatever lands without the claim links nothing, and a link nothing ended is cancelled.