mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 12:41:45 +02:00
fix: preventSilentAccess
This commit is contained in:
@@ -32,6 +32,13 @@ class UserStore extends BaseStore {
|
||||
});
|
||||
});
|
||||
EV.subscribe("db:sync", () => this.sync(false));
|
||||
EV.subscribe("user:loggedOut", async () => {
|
||||
if (window.PasswordCredential) {
|
||||
await navigator.credentials.preventSilentAccess();
|
||||
if (navigator.credentials.requireUserMediation)
|
||||
await navigator.credentials.requireUserMediation();
|
||||
}
|
||||
});
|
||||
await this.sync();
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -191,8 +191,6 @@ function Settings(props) {
|
||||
variant="list"
|
||||
onClick={async () => {
|
||||
if (await showLogoutConfirmation()) {
|
||||
if (window.PasswordCredential)
|
||||
await navigator.credentials.preventSilentAccess();
|
||||
await logout();
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user