Two factor authentication : TOTP #5

Merged
pierre merged 22 commits from twofactors into master 2022-04-20 07:40:51 +00:00
2 changed files with 2 additions and 4 deletions
Showing only changes of commit e8b3828f2c - Show all commits

View File

@ -48,9 +48,7 @@ impl<'a> SessionIdentity<'a> {
// Check if session is valid // Check if session is valid
if let Some(sess) = &res { if let Some(sess) = &res {
if sess.id.is_none() { sess.id.as_ref()?;
return None;
}
} }
res res

View File

@ -87,7 +87,7 @@ impl User {
} }
pub fn find_factor(&self, factor_id: &FactorID) -> Option<&TwoFactor> { pub fn find_factor(&self, factor_id: &FactorID) -> Option<&TwoFactor> {
self.two_factor.iter().find(|f| f.id.eq(&factor_id)) self.two_factor.iter().find(|f| f.id.eq(factor_id))
} }
} }