blob: b141ce7fe50d97f32ba59c194619668ad762cc2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use activitypub_federation::config::Data;
use axum::response::IntoResponse;
use oauth2::{CsrfToken, Scope};
use crate::server::{error::AppError, state::AppState};
pub(super) async fn discord_auth(data: Data<AppState>) -> Result<impl IntoResponse, AppError> {
let data = data.app_data();
let (auth_url, csrf_token) = data
.oauth_discord
.authorize_url(CsrfToken::new_random)
.add_scope(Scope::new("identify".to_string()))
.url();
Ok(String::default())
}
|