/// If necessary, refresh an identity cookie. This could include getting a
/// new access token from an OAuth API for example.
If necessary, refresh an identity cookie. This could include getting a
new access token from an OAuth API for example.
If necessary refresh an identity cookie . This could include getting a new access token from an OAuth API for example .
pub async fn refresh(mut self) -> Result<Self, TelescopeError> {
        // Refresh the root identity
        self.root = self.root.refresh().await?;
        // When there is an additional discord identity.
        if let Some(discord_identity) = self.discord {
            // Refresh the discord identity
            let refreshed = discord_identity.refresh().await?;
            // Store back and return self.
            self.discord = Some(refreshed);
            return Ok(self);
        }
        // Otherwise return self
        return Ok(self);
    }
pub async fn refresh ( mut self ) -> Result < Self , TelescopeError > { // Refresh the root identity self . root = self . root . refresh ( ) . await ? ; // When there is an additional discord identity. if let Some ( discord_identity ) = self . discord { // Refresh the discord identity let refreshed = discord_identity . refresh ( ) . await ? ; // Store back and return self. self . discord = Some ( refreshed ) ; return Ok ( self ) ; } // Otherwise return self return Ok ( self ) ; }
If necessary, refresh an identity cookie.
If necessary refresh an identity cookie .
mut self