PasswordAuthProof: invalidate when user is deleted from DB
This commit is contained in:
parent
886cc576d7
commit
a6872cda80
|
@ -75,7 +75,11 @@ export class PasswordAuthProof implements AuthProof<User> {
|
|||
}
|
||||
|
||||
public async isValid(): Promise<boolean> {
|
||||
return await this.isAuthorized() || typeof this.userID === 'number';
|
||||
if (typeof this.userID === 'number') {
|
||||
return Boolean(await this.getResource());
|
||||
} else {
|
||||
return await this.isAuthorized();
|
||||
}
|
||||
}
|
||||
|
||||
public async revoke(): Promise<void> {
|
||||
|
|
Loading…
Reference in New Issue