Initial Auth Impl + More Caching (#647)

* Port redis to staging

* redis cache on staging

* add back legacy auth callback

* Begin work on new auth flows

* Finish all auth flows

* Finish base session authentication

* run prep + fix clippy

* make compilation work
This commit is contained in:
Geometrically
2023-07-07 12:20:16 -07:00
committed by GitHub
parent b0057b130e
commit 239214ef92
53 changed files with 6250 additions and 6359 deletions

View File

@@ -37,7 +37,6 @@ impl Default for Badges {
#[derive(Serialize, Deserialize, Clone)]
pub struct User {
pub id: UserId,
pub kratos_id: Option<String>, // None if legacy user unconnected to Minos/Kratos
pub username: String,
pub name: Option<String>,
pub email: Option<String>,
@@ -48,11 +47,11 @@ pub struct User {
pub badges: Badges,
pub payout_data: Option<UserPayoutData>,
pub github_id: Option<u64>,
pub discord_id: Option<u64>,
pub google_id: Option<u128>,
pub microsoft_id: Option<u64>,
pub apple_id: Option<u64>,
pub gitlab_id: Option<u64>,
// pub discord_id: Option<u64>,
// pub google_id: Option<u128>,
// pub microsoft_id: Option<u64>,
// pub apple_id: Option<u64>,
// pub gitlab_id: Option<u64>,
}
#[derive(Serialize, Deserialize, Clone)]
@@ -136,7 +135,6 @@ impl From<DBUser> for User {
fn from(data: DBUser) -> Self {
Self {
id: data.id.into(),
kratos_id: data.kratos_id,
username: data.username,
name: data.name,
email: None,
@@ -147,11 +145,11 @@ impl From<DBUser> for User {
badges: data.badges,
payout_data: None,
github_id: None,
discord_id: None,
google_id: None,
microsoft_id: None,
apple_id: None,
gitlab_id: None,
// discord_id: None,
// google_id: None,
// microsoft_id: None,
// apple_id: None,
// gitlab_id: None,
}
}
}