Skip to content

Commit

Permalink
[AUT-1267] Throw an error if tenantId is missing (#41)
Browse files Browse the repository at this point in the history
* Throw error if no tenantId

* bump version
  • Loading branch information
hwhmeikle committed Aug 10, 2023
1 parent 3606021 commit 24dd489
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@authsignal/browser",
"version": "0.2.0",
"version": "0.2.1",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
4 changes: 4 additions & 0 deletions src/authsignal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export class Authsignal {
this.cookieDomain = cookieDomain || getCookieDomain();
this.anonymousIdCookieName = cookieName;

if (!tenantId) {
throw new Error("tenantId is required");
}

this.passkey = new Passkey({tenantId, baseUrl});

const idCookie = getCookie(this.anonymousIdCookieName);
Expand Down

0 comments on commit 24dd489

Please sign in to comment.