Skip to content

Commit

Permalink
[Client] Prioritize sessionID from URL over sessionStorage if present
Browse files Browse the repository at this point in the history
  • Loading branch information
Senryoku committed Oct 13, 2023
1 parent c326c4a commit 157d619
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ export default defineComponent({
if (windowSpecificDataStr) {
try {
const windowSpecificData = JSON.parse(windowSpecificDataStr);
if (windowSpecificData.userName && windowSpecificData.userID && windowSpecificData.sessionID) {
if (
windowSpecificData.userName &&
windowSpecificData.userID &&
windowSpecificData.sessionID &&
(!urlParamSession || sessionID === windowSpecificData.sessionID) // Prioritize sessionID from URL if present
) {
userName = windowSpecificData.userName;
userID = windowSpecificData.userID;
sessionID = windowSpecificData.sessionID;
Expand Down

0 comments on commit 157d619

Please sign in to comment.