feat: allow using existing jwt

This commit is contained in:
Derrick Hammer 2023-06-21 05:34:55 -04:00
parent e67ca43306
commit 3784858600
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 0 deletions

View File

@ -39,6 +39,7 @@ export interface ClientOptions {
email?: string;
password?: string;
privateKey?: Uint8Array;
jwt?: string;
}
interface FetchOptions {
@ -62,6 +63,10 @@ export class Client {
throw new Error("Portal url is required");
}
if (options.jwt) {
this.jwtSessionKey = options.jwt;
}
this._options = options;
}