File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
api/src/core/usecases/auth Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ export const makeInitiateLogout =
2424 throw new Error ( `Session not found: ${ sessionId } ` ) ;
2525 }
2626
27- // Mark session as logged out immediately
2827 await sessionRepository . update ( { ...session , loggedOutAt : new Date ( ) } ) ;
2928
3029 // Get logout URL from OIDC client
Original file line number Diff line number Diff line change @@ -123,12 +123,14 @@ export class HttpOidcClient implements OidcClient {
123123
124124 const userInfoAsString = responseBody . startsWith ( "ey" ) ? atob ( responseBody . split ( "." ) [ 1 ] ) : responseBody ;
125125
126+ console . log ( "\n \n userInfoAsString : " , userInfoAsString ) ;
127+
126128 return JSON . parse ( userInfoAsString ) ;
127129 }
128130
129131 async logout ( idToken : string | null ) : Promise < string > {
130132 if ( ! this . #config. end_session_endpoint ) {
131- throw new Error ( "OIDC provider does not support logout" ) ;
133+ return this . logoutRedirectUri ; // in that case we skip the logout and redirect to the identity provider logout page
132134 }
133135
134136 const logoutUrl = new URL ( this . #config. end_session_endpoint ) ;
You can’t perform that action at this time.
0 commit comments