Skip to content

Commit

Permalink
fix: client-side session validation fixed in case the cookie has been…
Browse files Browse the repository at this point in the history
… deleted server-side
  • Loading branch information
bjoern-m committed Nov 7, 2023
1 parent 693912d commit 7addb55
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/frontend-sdk/src/lib/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export class Session {
@returns {boolean} true if the session details are valid, false otherwise.
*/
private static validate(detail: SessionDetail): boolean {
return !!(detail.expirationSeconds > 0 && detail.userID?.length);
return !!(
detail.expirationSeconds > 0 &&
detail.userID?.length &&
detail.jwt?.length
);
}
}

0 comments on commit 7addb55

Please sign in to comment.