/// Try to remove the root identity from this authentication cookie
/// and replace it with one of the secondary ones. Return `false` if
/// there is no secondary cookie to replace the root. This may try to access
/// the RCOS API to look for an RCS ID to replace the root.
///
/// If the root can successfully be replaced, return `true`.
Try to remove the root identity from this authentication cookie
and replace it with one of the secondary ones. Return `false` if
there is no secondary cookie to replace the root. This may try to access
the RCOS API to look for an RCS ID to replace the root.

If the root can successfully be replaced, return `true`.
Try to remove the root identity from this authentication cookie and replace it with one of the secondary ones . Return ` false ` if there is no secondary cookie to replace the root . This may try to access the RCOS API to look for an RCS ID to replace the root . If the root can successfully be replaced return ` true ` .
async fn remove_root(&mut self) -> Result<bool, TelescopeError> {
        match self.root {
            // When the root identity is an RCS ID.
            RootIdentity::RpiCas(_) => {
                // Try with GitHub, then discord
                Ok(self.replace_root_with_github() || self.replace_root_with_discord())
            }
            // When root identity is GitHub auth
            RootIdentity::GitHub(_) => {
                // Try with discord then RCS id.
                Ok(self.replace_root_with_discord() || self.replace_root_with_rpi_cas().await?)
            }
            // When the root identity is Discord Auth
            RootIdentity::Discord(_) => {
                // Try with GitHub then with RPI CAS
                Ok(self.replace_root_with_github() || self.replace_root_with_rpi_cas().await?)
            }
        }
    }
async fn remove_root ( & mut self ) -> Result < bool , TelescopeError > { match self . root { // When the root identity is an RCS ID. RootIdentity :: RpiCas ( _ ) => { // Try with GitHub, then discord Ok ( self . replace_root_with_github ( ) || self . replace_root_with_discord ( ) ) } // When root identity is GitHub auth RootIdentity :: GitHub ( _ ) => { // Try with discord then RCS id. Ok ( self . replace_root_with_discord ( ) || self . replace_root_with_rpi_cas ( ) . await ? ) } // When the root identity is Discord Auth RootIdentity :: Discord ( _ ) => { // Try with GitHub then with RPI CAS Ok ( self . replace_root_with_github ( ) || self . replace_root_with_rpi_cas ( ) . await ? ) } } }
Try to remove the root identity from this authentication cookie
and replace it with one of the secondary ones.
Try to remove the root identity from this authentication cookie and replace it with one of the secondary ones .
&mut self