Skip to content

Commit 0b41abb

Browse files
authored
Update account.html
1 parent 0d90bb8 commit 0b41abb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/account.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@
138138

139139
if (PC) {
140140
const res = await fetch(`https://auth-api.itinerary.eu.org/auth/verifyToken/${PC}`; // Decode the username using atob
141+
const data = await res.json();
142+
const username = atob(data.username);
141143
localStorage.setItem('usernameEnc', username); // Store the original Base64-encoded username
144+
localStorage.setItem('username', data.username);
142145
localStorage.setItem('loggedIn', 'true');
143146
window.location.href = 'index.html';
144147

0 commit comments

Comments
 (0)