You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-25 17:02:04 +03:00
Store mx_pass at the same point as access_token
So that we don't overwrite the existing one every time we try to register.
This commit is contained in:
@ -303,6 +303,12 @@ export function setLoggedIn(credentials) {
|
||||
localStorage.setItem("mx_device_id", credentials.deviceId);
|
||||
}
|
||||
|
||||
// The user registered as a PWLU (PassWord-Less User), the generated password
|
||||
// is cached here such that the user can change it at a later time.
|
||||
if (credentials.password) {
|
||||
localStorage.setItem("mx_pass", credentials.password);
|
||||
}
|
||||
|
||||
console.log("Session persisted for %s", credentials.userId);
|
||||
} catch (e) {
|
||||
console.warn("Error using local storage: can't persist session!", e);
|
||||
|
Reference in New Issue
Block a user