From 378485860092b87b82cabb547bae8025156e7637 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 21 Jun 2023 05:34:55 -0400 Subject: [PATCH] feat: allow using existing jwt --- src/client.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client.ts b/src/client.ts index 40b8ddb..98997fb 100644 --- a/src/client.ts +++ b/src/client.ts @@ -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; }