-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add public route to reset local data
When the stack serves the login page, we take this opportunity to remove any remaining local data, i.e. indexedDB and localstorage data. See how it is done for the stack part: cozy/cozy-stack#4483
- Loading branch information
1 parent
9491e0e
commit 43fb9bd
Showing
4 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<html> | ||
<head> | ||
<script> | ||
// Remove all indexedDB databases | ||
window.indexedDB.databases().then(function(databases) { | ||
databases.forEach(function(db) { | ||
console.log('Delete indexedDB database : ', db.name); | ||
window.indexedDB.deleteDatabase(db.name) | ||
}) | ||
}) | ||
// Remove localstorage | ||
window.localStorage.clear() | ||
</script> | ||
</head> | ||
</html> |