File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
crates/handlers/src/compat Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -508,19 +508,16 @@ async fn token_login(
508
508
) ;
509
509
return Err ( RouteError :: InvalidLoginToken ) ;
510
510
} ;
511
+ if browser_session. user . locked_at . is_some ( ) {
512
+ return Err ( RouteError :: UserLocked ) ;
513
+ }
511
514
if !browser_session. active ( ) || !browser_session. user . is_valid ( ) {
512
515
tracing:: info!(
513
516
compat_sso_login. id = %login. id,
514
517
browser_session. id = %browser_session_id,
515
518
"Attempt to exchange login token but browser session is not active"
516
519
) ;
517
- return Err (
518
- if browser_session. finished_at . is_none ( ) && browser_session. user . locked_at . is_some ( ) {
519
- RouteError :: UserLocked
520
- } else {
521
- RouteError :: InvalidLoginToken
522
- } ,
523
- ) ;
520
+ return Err ( RouteError :: InvalidLoginToken ) ;
524
521
}
525
522
526
523
// We're about to create a device, let's explicitly acquire a lock, so that
You can’t perform that action at this time.
0 commit comments