@plainkey/browser 0.3.7 → 0.4.1
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.mts → index.d.ts} +1 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/{index.mjs → index.js} +1 -1
- package/dist/index.js.map +1 -0
- package/package.json +12 -14
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/plainkey-client.ts"],"sourcesContent":[],"mappings":";;;KAsBY,oBAAA;EAAA,SAAA,EAAA,MAAA;EAMC,OAAA,CAAA,EAAA,MAAA;CAIe;AAWM,cAfrB,cAAA,CAeqB;EAAmC,iBAAA,SAAA;EAAR,iBAAA,OAAA;EAwD5C,WAAA,CAAA,YAAA,EAnEW,oBAmEX;EACJ;;;;EAuDkC,YAAA,CAAA,WAAA,EAhHb,wBAgHa,CAAA,EAhHc,OAgHd,CAhHsB,4BAgHtB,CAAA;EAAO;;;;;6BAxDrC,6BACZ,QAAQ;;;;qBAuDc,oBAAoB,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["errorData: ErrorResponse","credential: RegistrationResponseJSON","completeParams: RegistrationCompleteRequest","response: RegistrationCompleteResponse","completeParams: UserCredentialCompleteRequest","response: UserCredentialCompleteResponse","beginResponseData: LoginBeginResponse","authenticationResponse: AuthenticationResponseJSON","completeParams: LoginCompleteRequest","verificationResponseData: LoginCompleteResponse"],"sources":["../src/plainkey-client.ts"],"sourcesContent":["import { startAuthentication, startRegistration } from \"@simplewebauthn/browser\"\nimport { RegistrationResponseJSON, AuthenticationResponseJSON } from \"@simplewebauthn/browser\"\n\nimport type {\n RegistrationBeginRequest,\n RegistrationCompleteRequest,\n UserCredentialBeginRequest,\n UserCredentialCompleteRequest,\n LoginBeginRequest,\n LoginCompleteRequest\n} from \"@plainkey/types\"\n\nimport type {\n RegistrationBeginResponse,\n RegistrationCompleteResponse,\n UserCredentialBeginResponse,\n UserCredentialCompleteResponse,\n LoginBeginResponse,\n LoginCompleteResponse,\n ErrorResponse\n} from \"@plainkey/types\"\n\nexport type PlainKeyClientParams = {\n projectId: string\n baseUrl?: string\n}\n\n// TODO: Account for errors like this: \"Unexpected token 'R', \"Response v\"... is not valid JSON\"\nexport class PlainKeyClient {\n private readonly projectId: string\n private readonly baseUrl: string\n\n constructor(clientParams: PlainKeyClientParams) {\n const { projectId, baseUrl = \"https://api.plainkey.io/api\" } = clientParams\n\n this.projectId = projectId\n this.baseUrl = baseUrl.replace(/\\/$/, \"\") // Remove trailing slash\n }\n\n /**\n * Registration of a new user with passkey.\n * Creates a new user and adds a credential to it.\n */\n async Registration(beginParams: RegistrationBeginRequest): Promise<RegistrationCompleteResponse> {\n // Step 1: Get registration options from server\n const beginResponse = await fetch(`${this.baseUrl}/user/register/begin`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(beginParams)\n })\n\n if (!beginResponse.ok) {\n const errorData: ErrorResponse = await beginResponse.json()\n throw new Error(errorData.error)\n }\n\n const { options, user } = (await beginResponse.json()) as RegistrationBeginResponse\n\n // Step 2: Create credential using browser's WebAuthn API\n const credential: RegistrationResponseJSON = await startRegistration({\n optionsJSON: options\n })\n\n // Step 3: Send credential to server for verification\n const completeParams: RegistrationCompleteRequest = {\n userIdentifier: { userId: user.id },\n credential\n }\n\n const completeResponse = await fetch(`${this.baseUrl}/user/register/complete`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(completeParams)\n })\n\n if (!completeResponse.ok) {\n const errorData: ErrorResponse = await completeResponse.json()\n throw new Error(errorData.error)\n }\n\n // Intentionally not throwing errors on verification failure - UI should handle this.\n const response: RegistrationCompleteResponse = await completeResponse.json()\n if (!response) throw new Error(\"No registration response from server\")\n\n return response\n }\n\n /**\n * Add credential to existing user.\n * Requires a valid user authentication token passed in beginParams, which will be sent in the request body.\n * However, do not store the token in local storage, database, etc. Always keep it in memory.\n */\n async AddCredential(\n beginParams: UserCredentialBeginRequest\n ): Promise<UserCredentialCompleteResponse> {\n // Step 1: Get credential registration options from server\n\n const beginResponse = await fetch(`${this.baseUrl}/user/credential/begin`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(beginParams)\n })\n\n if (!beginResponse.ok) {\n const errorData: ErrorResponse = await beginResponse.json()\n throw new Error(errorData.error)\n }\n\n const { options, user } = (await beginResponse.json()) as UserCredentialBeginResponse\n\n // Step 2: Create credential using browser's WebAuthn API\n const credential: RegistrationResponseJSON = await startRegistration({\n optionsJSON: options\n })\n\n // Step 3: Send credential to server for verification\n const completeParams: UserCredentialCompleteRequest = {\n userToken: beginParams.userToken,\n userIdentifier: { userId: user.id },\n credential\n }\n\n const completeResponse = await fetch(`${this.baseUrl}/user/credential/complete`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(completeParams)\n })\n\n if (!completeResponse.ok) {\n const errorData: ErrorResponse = await completeResponse.json()\n throw new Error(errorData.error)\n }\n\n // Intentionally not throwing errors on verification failure - UI should handle this.\n const response: UserCredentialCompleteResponse = await completeResponse.json()\n if (!response) throw new Error(\"No credential registration response from server\")\n\n return response\n }\n\n /**\n * Performs a login ceremony.\n */\n async Login(beginParams: LoginBeginRequest): Promise<LoginCompleteResponse> {\n // Step 1: Get authentication options from server\n const beginResponse = await fetch(`${this.baseUrl}/login/begin`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(beginParams)\n })\n\n if (!beginResponse.ok) {\n const errorData: ErrorResponse = await beginResponse.json()\n throw new Error(errorData.error)\n }\n\n const beginResponseData: LoginBeginResponse = await beginResponse.json()\n if (!beginResponseData.options) {\n throw new Error(\"No options found in login begin response\")\n }\n\n // Step 2: Pass options to the authenticator and wait for response\n const authenticationResponse: AuthenticationResponseJSON = await startAuthentication({\n optionsJSON: beginResponseData.options\n })\n\n if (!authenticationResponse) {\n throw new Error(\"No authentication response from browser\")\n }\n\n // Step 3: POST the response to the server\n // This uses the login session ID from the begin response - always in JS memory.\n // Do not store it in local storage, database, etc.\n const completeParams: LoginCompleteRequest = {\n loginSessionId: beginResponseData.loginSession.id,\n authenticationResponse\n }\n\n const verificationResponse = await fetch(`${this.baseUrl}/login/complete`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(completeParams)\n })\n\n if (!verificationResponse.ok) {\n const errorData: ErrorResponse = await verificationResponse.json()\n throw new Error(errorData.error)\n }\n\n // Intentionally not throwing errors on verification failure - UI should handle this.\n const verificationResponseData: LoginCompleteResponse = await verificationResponse.json()\n if (!verificationResponseData) throw new Error(\"No login verification response from server\")\n\n return verificationResponseData\n }\n}\n"],"mappings":";;;AA4BA,IAAa,iBAAb,MAA4B;CAI1B,YAAY,cAAoC;EAC9C,MAAM,EAAE,WAAW,UAAU,kCAAkC;AAE/D,OAAK,YAAY;AACjB,OAAK,UAAU,QAAQ,QAAQ,OAAO,GAAG;;;;;;CAO3C,MAAM,aAAa,aAA8E;EAE/F,MAAM,gBAAgB,MAAM,MAAM,GAAG,KAAK,QAAQ,uBAAuB;GACvE,QAAQ;GACR,SAAS;IACP,gBAAgB;IAChB,gBAAgB,KAAK;IACtB;GACD,MAAM,KAAK,UAAU,YAAY;GAClC,CAAC;AAEF,MAAI,CAAC,cAAc,IAAI;GACrB,MAAMA,YAA2B,MAAM,cAAc,MAAM;AAC3D,SAAM,IAAI,MAAM,UAAU,MAAM;;EAGlC,MAAM,EAAE,SAAS,SAAU,MAAM,cAAc,MAAM;EAGrD,MAAMC,aAAuC,MAAM,kBA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": "PlainKey
|
|
5
|
-
"
|
|
6
|
-
"main": "dist/index.
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.mts",
|
|
11
|
-
"import": "./dist/index.mjs"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "PlainKey browser SDK for passkey registration, login and credential management",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
14
9
|
"sideEffects": false,
|
|
15
10
|
"files": [
|
|
16
11
|
"dist"
|
|
17
12
|
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./dist/index.js",
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
18
17
|
"scripts": {
|
|
19
|
-
"build": "tsdown
|
|
20
|
-
"
|
|
18
|
+
"build": "tsdown --clean --config tsdown.config.ts",
|
|
19
|
+
"prepare": "npm run build",
|
|
21
20
|
"prepublishOnly": "npm run build"
|
|
22
21
|
},
|
|
23
22
|
"publishConfig": {
|
|
24
23
|
"access": "public"
|
|
25
24
|
},
|
|
26
25
|
"dependencies": {
|
|
27
|
-
"@plainkey/types": "*",
|
|
28
26
|
"@simplewebauthn/browser": "^13.2.0"
|
|
29
27
|
},
|
|
30
28
|
"devDependencies": {
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/plainkey-client.ts"],"sourcesContent":[],"mappings":";;;KAsBY,oBAAA;EAAA,SAAA,EAAA,MAAA;EAMC,OAAA,CAAA,EAAA,MAAA;CAAc;AAIC,cAJf,cAAA,CAIe;mBAWM,SAAA;mBAAmC,OAAA;aAAR,CAAA,YAAA,EAXjC,oBAWiC;;;;;cAgHN,CAAA,WAAA,EAhHrB,wBAgHqB,CAAA,EAhHM,OAgHN,CAhHc,4BAgHd,CAAA;;;;;;6BAxDtC,6BACZ,QAAQ;;;;qBAuDc,oBAAoB,QAAQ"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["errorData: ErrorResponse","credential: RegistrationResponseJSON","completeParams: RegistrationCompleteRequest","response: RegistrationCompleteResponse","completeParams: UserCredentialCompleteRequest","response: UserCredentialCompleteResponse","beginResponseData: LoginBeginResponse","authenticationResponse: AuthenticationResponseJSON","completeParams: LoginCompleteRequest","verificationResponseData: LoginCompleteResponse"],"sources":["../src/plainkey-client.ts"],"sourcesContent":["import { startAuthentication, startRegistration } from \"@simplewebauthn/browser\"\nimport { RegistrationResponseJSON, AuthenticationResponseJSON } from \"@simplewebauthn/browser\"\n\nimport type {\n RegistrationBeginRequest,\n RegistrationCompleteRequest,\n UserCredentialBeginRequest,\n UserCredentialCompleteRequest,\n LoginBeginRequest,\n LoginCompleteRequest\n} from \"@plainkey/types\"\n\nimport type {\n RegistrationBeginResponse,\n RegistrationCompleteResponse,\n UserCredentialBeginResponse,\n UserCredentialCompleteResponse,\n LoginBeginResponse,\n LoginCompleteResponse,\n ErrorResponse\n} from \"@plainkey/types\"\n\nexport type PlainKeyClientParams = {\n projectId: string\n baseUrl?: string\n}\n\n// TODO: Account for errors like this: \"Unexpected token 'R', \"Response v\"... is not valid JSON\"\nexport class PlainKeyClient {\n private readonly projectId: string\n private readonly baseUrl: string\n\n constructor(clientParams: PlainKeyClientParams) {\n const { projectId, baseUrl = \"https://api.plainkey.io/api\" } = clientParams\n\n this.projectId = projectId\n this.baseUrl = baseUrl.replace(/\\/$/, \"\") // Remove trailing slash\n }\n\n /**\n * Registration of a new user with passkey.\n * Creates a new user and adds a credential to it.\n */\n async Registration(beginParams: RegistrationBeginRequest): Promise<RegistrationCompleteResponse> {\n // Step 1: Get registration options from server\n const beginResponse = await fetch(`${this.baseUrl}/user/register/begin`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(beginParams)\n })\n\n if (!beginResponse.ok) {\n const errorData: ErrorResponse = await beginResponse.json()\n throw new Error(errorData.error)\n }\n\n const { options, user } = (await beginResponse.json()) as RegistrationBeginResponse\n\n // Step 2: Create credential using browser's WebAuthn API\n const credential: RegistrationResponseJSON = await startRegistration({\n optionsJSON: options\n })\n\n // Step 3: Send credential to server for verification\n const completeParams: RegistrationCompleteRequest = {\n userIdentifier: { userId: user.id },\n credential\n }\n\n const completeResponse = await fetch(`${this.baseUrl}/user/register/complete`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(completeParams)\n })\n\n if (!completeResponse.ok) {\n const errorData: ErrorResponse = await completeResponse.json()\n throw new Error(errorData.error)\n }\n\n // Intentionally not throwing errors on verification failure - UI should handle this.\n const response: RegistrationCompleteResponse = await completeResponse.json()\n if (!response) throw new Error(\"No registration response from server\")\n\n return response\n }\n\n /**\n * Add credential to existing user.\n * Requires a valid user authentication token passed in beginParams, which will be sent in the request body.\n * However, do not store the token in local storage, database, etc. Always keep it in memory.\n */\n async AddCredential(\n beginParams: UserCredentialBeginRequest\n ): Promise<UserCredentialCompleteResponse> {\n // Step 1: Get credential registration options from server\n\n const beginResponse = await fetch(`${this.baseUrl}/user/credential/begin`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(beginParams)\n })\n\n if (!beginResponse.ok) {\n const errorData: ErrorResponse = await beginResponse.json()\n throw new Error(errorData.error)\n }\n\n const { options, user } = (await beginResponse.json()) as UserCredentialBeginResponse\n\n // Step 2: Create credential using browser's WebAuthn API\n const credential: RegistrationResponseJSON = await startRegistration({\n optionsJSON: options\n })\n\n // Step 3: Send credential to server for verification\n const completeParams: UserCredentialCompleteRequest = {\n userToken: beginParams.userToken,\n userIdentifier: { userId: user.id },\n credential\n }\n\n const completeResponse = await fetch(`${this.baseUrl}/user/credential/complete`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(completeParams)\n })\n\n if (!completeResponse.ok) {\n const errorData: ErrorResponse = await completeResponse.json()\n throw new Error(errorData.error)\n }\n\n // Intentionally not throwing errors on verification failure - UI should handle this.\n const response: UserCredentialCompleteResponse = await completeResponse.json()\n if (!response) throw new Error(\"No credential registration response from server\")\n\n return response\n }\n\n /**\n * Performs a login ceremony.\n */\n async Login(beginParams: LoginBeginRequest): Promise<LoginCompleteResponse> {\n // Step 1: Get authentication options from server\n const beginResponse = await fetch(`${this.baseUrl}/login/begin`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(beginParams)\n })\n\n if (!beginResponse.ok) {\n const errorData: ErrorResponse = await beginResponse.json()\n throw new Error(errorData.error)\n }\n\n const beginResponseData: LoginBeginResponse = await beginResponse.json()\n if (!beginResponseData.options) {\n throw new Error(\"No options found in login begin response\")\n }\n\n // Step 2: Pass options to the authenticator and wait for response\n const authenticationResponse: AuthenticationResponseJSON = await startAuthentication({\n optionsJSON: beginResponseData.options\n })\n\n if (!authenticationResponse) {\n throw new Error(\"No authentication response from browser\")\n }\n\n // Step 3: POST the response to the server\n // This uses the login session ID from the begin response - always in JS memory.\n // Do not store it in local storage, database, etc.\n const completeParams: LoginCompleteRequest = {\n loginSessionId: beginResponseData.loginSession.id,\n authenticationResponse\n }\n\n const verificationResponse = await fetch(`${this.baseUrl}/login/complete`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-project-id\": this.projectId\n },\n body: JSON.stringify(completeParams)\n })\n\n if (!verificationResponse.ok) {\n const errorData: ErrorResponse = await verificationResponse.json()\n throw new Error(errorData.error)\n }\n\n // Intentionally not throwing errors on verification failure - UI should handle this.\n const verificationResponseData: LoginCompleteResponse = await verificationResponse.json()\n if (!verificationResponseData) throw new Error(\"No login verification response from server\")\n\n return verificationResponseData\n }\n}\n"],"mappings":";;;AA4BA,IAAa,iBAAb,MAA4B;CAI1B,YAAY,cAAoC;EAC9C,MAAM,EAAE,WAAW,UAAU,kCAAkC;AAE/D,OAAK,YAAY;AACjB,OAAK,UAAU,QAAQ,QAAQ,OAAO,GAAG;;;;;;CAO3C,MAAM,aAAa,aAA8E;EAE/F,MAAM,gBAAgB,MAAM,MAAM,GAAG,KAAK,QAAQ,uBAAuB;GACvE,QAAQ;GACR,SAAS;IACP,gBAAgB;IAChB,gBAAgB,KAAK;IACtB;GACD,MAAM,KAAK,UAAU,YAAY;GAClC,CAAC;AAEF,MAAI,CAAC,cAAc,IAAI;GACrB,MAAMA,YAA2B,MAAM,cAAc,MAAM;AAC3D,SAAM,IAAI,MAAM,UAAU,MAAM;;EAGlC,MAAM,EAAE,SAAS,SAAU,MAAM,cAAc,MAAM;EAGrD,MAAMC,aAAuC,MAAM,kBAAkB,EACnE,aAAa,SACd,CAAC;EAGF,MAAMC,iBAA8C;GAClD,gBAAgB,EAAE,QAAQ,KAAK,IAAI;GACnC;GACD;EAED,MAAM,mBAAmB,MAAM,MAAM,GAAG,KAAK,QAAQ,0BAA0B;GAC7E,QAAQ;GACR,SAAS;IACP,gBAAgB;IAChB,gBAAgB,KAAK;IACtB;GACD,MAAM,KAAK,UAAU,eAAe;GACrC,CAAC;AAEF,MAAI,CAAC,iBAAiB,IAAI;GACxB,MAAMF,YAA2B,MAAM,iBAAiB,MAAM;AAC9D,SAAM,IAAI,MAAM,UAAU,MAAM;;EAIlC,MAAMG,WAAyC,MAAM,iBAAiB,MAAM;AAC5E,MAAI,CAAC,SAAU,OAAM,IAAI,MAAM,uCAAuC;AAEtE,SAAO;;;;;;;CAQT,MAAM,cACJ,aACyC;EAGzC,MAAM,gBAAgB,MAAM,MAAM,GAAG,KAAK,QAAQ,yBAAyB;GACzE,QAAQ;GACR,SAAS;IACP,gBAAgB;IAChB,g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