main
rs 16 lines 504 Bytes
Raw
1 use smbcloud_model::{
2 error_codes::ErrorResponse,
3 oauth::{OauthRedirect, TokenResponse},
4 };
5
6 #[tauri::command]
7 pub async fn get_token(oauth_redirect: OauthRedirect) -> Result<TokenResponse, ErrorResponse> {
8 let client_id = dotenv!("GOOGLE_OAUTH_CLIENT_ID").to_string();
9 let client_secret = dotenv!("GOOGLE_OAUTH_CLIENT_SECRET").to_string();
10 smbcloud_networking_account::oauth::get_token::get_token(
11 oauth_redirect,
12 client_id,
13 client_secret,
14 )
15 .await
16 }