MCPcopy Create free account
hub / github.com/Moosync/Moosync / authorize

Method authorize

src-tauri/src/providers/youtube.rs:604–621  ·  view source on GitHub ↗
(&self, code: String)

Source from the content-addressed store, hash-verified

602
603 #[tracing::instrument(level = "debug", skip(self, code))]
604 async fn authorize(&self, code: String) -> Result<()> {
605 let mut tokens = self.tokens.lock().await;
606 *tokens = Some(
607 authorize(
608 "MoosyncYoutubeRefreshToken",
609 code,
610 self.verifier.lock().await.take(),
611 &self.app,
612 )
613 .await?,
614 );
615
616 self.create_api_client().await;
617
618 let status = self.fetch_user_details().await.unwrap();
619 let _ = self.status_tx.lock().await.send(status).await;
620 Ok(())
621 }
622
623 #[tracing::instrument(level = "debug", skip(self, pagination))]
624 async fn fetch_user_playlists(

Callers

nothing calls this directly

Calls 4

authorizeFunction · 0.85
sendMethod · 0.80
create_api_clientMethod · 0.45
fetch_user_detailsMethod · 0.45

Tested by

no test coverage detected