mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 21:06:22 +08:00
fix: token exp
This commit is contained in:
@@ -126,7 +126,8 @@ export class Token {
|
|||||||
|
|
||||||
get isExpired() {
|
get isExpired() {
|
||||||
if (!this._user) return true;
|
if (!this._user) return true;
|
||||||
return Date.now() > this._user.exp;
|
// exp is in seconds
|
||||||
|
return Date.now() > this._user.exp * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
static parse(token: string): AccessTokenMessage | null {
|
static parse(token: string): AccessTokenMessage | null {
|
||||||
|
|||||||
Reference in New Issue
Block a user