summaryrefslogtreecommitdiff
path: root/src/lib/token.ts
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-05-06 00:02:56 -0600
committerHombreLaser <sebastian-440@live.com>2023-05-06 00:02:56 -0600
commit8040a87759746c81694d2cbd1fb82039eb0e68f0 (patch)
tree925e0e7e6ad8e489d6df43bd2edb294bc0303ab1 /src/lib/token.ts
parentf86cd3d1b248436f911dc2e1c9e71910a5302108 (diff)
Agregado dropdown menu de autenticación
Diffstat (limited to 'src/lib/token.ts')
-rw-r--r--src/lib/token.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/token.ts b/src/lib/token.ts
index 113e76d..8508cac 100644
--- a/src/lib/token.ts
+++ b/src/lib/token.ts
@@ -14,4 +14,13 @@ export default class Token {
setRefresh(refresh_token: string) {
sessionStorage.setItem("refresh", refresh_token);
}
+
+ present() {
+ return sessionStorage.getItem("token") != null;
+ }
+
+ logout() {
+ sessionStorage.removeItem("token");
+ sessionStorage.removeItem("refresh");
+ }
} \ No newline at end of file