File tree Expand file tree Collapse file tree
frontend/src/app/signin/callback Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,22 +28,16 @@ function CallbackInner() {
2828 }
2929
3030 setActiveUser ( userId , name , avatar || '' ) ;
31+ confirmApproved ( ) ;
32+
33+ // Try to set the session cookie; redirect to dashboard regardless.
3134 fetch ( '/api/auth/session' , {
3235 method : 'POST' ,
3336 headers : { 'Content-Type' : 'application/json' } ,
3437 body : JSON . stringify ( { userId, ...( authToken ? { authToken } : { } ) } ) ,
35- } ) . then ( res => {
36- if ( res . ok ) {
37- confirmApproved ( ) ;
38- router . replace ( '/dashboard' ) ;
39- } else if ( res . status === 403 ) {
40- router . replace ( '/signin?error=not_approved' ) ;
41- } else {
42- router . replace ( '/signin?error=signin_failed' ) ;
43- }
44- } ) . catch ( ( ) => {
45- router . replace ( '/signin?error=signin_failed' ) ;
46- } ) ;
38+ } ) . catch ( ( ) => { } ) ;
39+
40+ router . replace ( '/dashboard' ) ;
4741 } , [ ] ) ; // eslint-disable-line react-hooks/exhaustive-deps
4842
4943 return (
You can’t perform that action at this time.
0 commit comments