feat: Implement password reset and change functionality
Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
co-authored by
mathieumoran1
parent
7a5ef7e9a0
commit
c83b4685a2
@@ -16,6 +16,10 @@ window.onload = async function () {
|
||||
if (token) {
|
||||
try {
|
||||
const decoded = JSON.parse(atob(token.split('.')[1])); // Manually decoding JWT
|
||||
if (decoded.mustChangePassword) {
|
||||
window.location.href = '/change-password.html';
|
||||
return;
|
||||
}
|
||||
const userName = decoded.name;
|
||||
document.getElementById('user-name').textContent = userName;
|
||||
if (decoded.admin) {
|
||||
|
||||
Reference in New Issue
Block a user