@authsignal/browser 0.0.21 → 0.1.0

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.
@@ -0,0 +1,20 @@
1
+ declare type PasskeyOptions = {
2
+ baseUrl: string;
3
+ tenantId: string;
4
+ };
5
+ declare type SignUpParams = {
6
+ userName?: string;
7
+ token: string;
8
+ };
9
+ export declare class Passkey {
10
+ private api;
11
+ constructor({ baseUrl, tenantId }: PasskeyOptions);
12
+ signUp({ userName, token }: SignUpParams): Promise<string | undefined>;
13
+ signIn(params?: {
14
+ token: string;
15
+ }): Promise<string | undefined>;
16
+ signIn(params?: {
17
+ autofill: boolean;
18
+ }): Promise<string | undefined>;
19
+ }
20
+ export {};
package/dist/types.d.ts CHANGED
@@ -23,7 +23,6 @@ declare type PopupLaunchOptions = BaseLaunchOptions & {
23
23
  };
24
24
  export declare type LaunchOptions = RedirectLaunchOptions | PopupLaunchOptions;
25
25
  export declare type AuthsignalOptions = {
26
- publishableKey: string;
27
26
  /**
28
27
  * Cookie domain that will be used to identify
29
28
  * users. If not set, location.hostname will be used
@@ -40,6 +39,8 @@ export declare type AuthsignalOptions = {
40
39
  * Name of id cookie. `__as_aid` by default
41
40
  */
42
41
  cookieName?: string;
42
+ baseUrl?: string;
43
+ tenantId: string;
43
44
  };
44
45
  export declare enum AuthsignalWindowMessage {
45
46
  AUTHSIGNAL_CLOSE_POPUP = "AUTHSIGNAL_CLOSE_POPUP"
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@authsignal/browser",
3
- "type": "module",
4
- "version": "0.0.21",
3
+ "version": "0.1.0",
5
4
  "main": "dist/index.js",
6
5
  "module": "dist/index.mjs",
7
6
  "types": "dist/index.d.ts",
@@ -22,13 +21,16 @@
22
21
  },
23
22
  "dependencies": {
24
23
  "@fingerprintjs/fingerprintjs": "^3.3.6",
24
+ "@simplewebauthn/browser": "^7.2.0",
25
25
  "a11y-dialog": "^7.5.2",
26
26
  "iframe-resizer": "^4.3.6",
27
+ "ky": "^0.33.3",
27
28
  "uuid": "^9.0.0"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@rollup/plugin-node-resolve": "^14.1.0",
31
32
  "@rollup/plugin-typescript": "^8.5.0",
33
+ "@simplewebauthn/typescript-types": "^7.0.0",
32
34
  "@types/iframe-resizer": "^3.5.9",
33
35
  "@types/uuid": "^8.3.4",
34
36
  "@typescript-eslint/eslint-plugin": "^5.39.0",