Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/RPC/CocoonService/Auth/
GetAuthenticationSession.rs

1//! Return an authentication session for the requested provider. Cocoon
2//! auth providers register themselves via `RegisterAuthenticationProvider`
3//! and live in `ApplicationState`; the full OAuth dance requires Mountain
4//! to open a browser window, so for now we return an empty session.
5
6use tonic::{Response, Status};
7
8use crate::{
9	RPC::CocoonService::CocoonServiceImpl,
10	Vine::Generated::{GetAuthenticationSessionRequest, GetAuthenticationSessionResponse},
11	dev_log,
12};
13
14pub async fn Fn(
15	_Service:&CocoonServiceImpl,
16
17	Request:GetAuthenticationSessionRequest,
18) -> Result<Response<GetAuthenticationSessionResponse>, Status> {
19	dev_log!(
20		"cocoon",
21		"[CocoonService] get_authentication_session: provider={}",
22		Request.provider_id
23	);
24
25	Ok(Response::new(GetAuthenticationSessionResponse::default()))
26}