@authsignal/browser 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -5,11 +5,8 @@ type Challenge = {
5
5
  type Mfa = {
6
6
  url: string;
7
7
  };
8
- interface UserProps {
9
- id?: string;
10
- email?: string;
11
- }
12
8
  type AuthsignalOptions = {
9
+ publishableKey: string;
13
10
  /**
14
11
  * Cookie domain that will be used to identify
15
12
  * users. If not set, location.hostname will be used
@@ -27,18 +24,12 @@ type AuthsignalOptions = {
27
24
  */
28
25
  cookieName?: string;
29
26
  };
30
- declare function authsignalBrowser(publishableKey: string, options?: AuthsignalOptions): AuthsignalBrowser;
31
27
  declare class AuthsignalBrowser {
32
28
  private anonymousId;
33
- private publishableKey;
34
29
  private cookieDomain;
35
- private idCookieName;
36
- private trackingHost;
37
- private fingerprintClient?;
38
- private deviceFingerprint?;
39
- init(publishableKey: string, options?: AuthsignalOptions): Promise<void>;
40
- identify(props: UserProps): Promise<void>;
41
- private getAnonymousId;
30
+ private anonymousIdCookieName;
31
+ private publishableKey;
32
+ constructor({ publishableKey, cookieDomain, cookieName }: AuthsignalOptions);
42
33
  mfa({ url }: Mfa): void;
43
34
  challenge(challenge: {
44
35
  mode?: "redirect";
@@ -46,10 +37,5 @@ declare class AuthsignalBrowser {
46
37
  challenge(challenge: {
47
38
  mode: "popup";
48
39
  } & Challenge): Promise<boolean>;
49
- private registerIdentity;
50
- private registerAnonymousId;
51
- private buildRegisterAnonymousIdRequest;
52
- private sendJson;
53
- private xmlHttpReqTransport;
54
40
  }
55
- export { authsignalBrowser, AuthsignalBrowser };
41
+ export { AuthsignalBrowser };
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "@authsignal/browser",
3
3
  "type": "module",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/index.d.ts",
8
- "keywords": ["authsignal", "mfa", "2fa", "authentication"],
8
+ "keywords": [
9
+ "authsignal",
10
+ "mfa",
11
+ "2fa",
12
+ "authentication"
13
+ ],
9
14
  "license": "MIT",
10
15
  "repository": "git://github.com/authsignal/authsignal-browser.git",
11
16
  "sideEffects": false,
@@ -23,7 +28,6 @@
23
28
  "devDependencies": {
24
29
  "@rollup/plugin-commonjs": "^22.0.0",
25
30
  "@rollup/plugin-node-resolve": "^13.3.0",
26
- "@types/basiclightbox": "^5.0.1",
27
31
  "@types/uuid": "^8.3.4",
28
32
  "@typescript-eslint/eslint-plugin": "^5.25.0",
29
33
  "@typescript-eslint/parser": "^5.25.0",
@@ -36,7 +40,9 @@
36
40
  "tslib": "^2.4.0",
37
41
  "typescript": "^4.6.4"
38
42
  },
39
- "files": ["dist"],
43
+ "files": [
44
+ "dist"
45
+ ],
40
46
  "exports": {
41
47
  ".": {
42
48
  "import": "./dist/esm/index.js",