Skip to content

Commit

Permalink
Return passkey registration/authentication response (#73)
Browse files Browse the repository at this point in the history
* wip

* wip
  • Loading branch information
hwhmeikle authored Sep 18, 2024
1 parent 75de233 commit 7d97f75
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 23 deletions.
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@authsignal/browser",
"version": "0.5.10",
"version": "0.5.11",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down Expand Up @@ -28,16 +28,15 @@
},
"dependencies": {
"@fingerprintjs/fingerprintjs": "^3.3.6",
"@simplewebauthn/browser": "^9.0.1",
"@simplewebauthn/types": "^9.0.1",
"@simplewebauthn/browser": "^10.0.0",
"@simplewebauthn/types": "^10.0.0",
"a11y-dialog": "8.0.4",
"uuid": "^9.0.0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^14.1.0",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^8.5.0",
"@simplewebauthn/typescript-types": "^8.0.0",
"@types/iframe-resizer": "^3.5.9",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.39.0",
Expand All @@ -48,7 +47,7 @@
"prettier": "^2.7.1",
"rollup": "^2.79.1",
"tslib": "^2.4.0",
"typescript": "^4.8.4"
"typescript": "^5.6.2"
},
"files": [
"dist"
Expand Down
4 changes: 4 additions & 0 deletions src/passkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type SignUpParams = {

type SignUpResponse = {
token?: string;
registrationResponse?: RegistrationResponseJSON;
};

type SignInParams = {
Expand All @@ -36,6 +37,7 @@ type SignInResponse = {
userAuthenticatorId?: string;
userName?: string;
userDisplayName?: string;
authenticationResponse?: AuthenticationResponseJSON;
};

export class Passkey {
Expand Down Expand Up @@ -100,6 +102,7 @@ export class Passkey {

return {
token: addAuthenticatorResponse.accessToken,
registrationResponse,
};
}

Expand Down Expand Up @@ -166,6 +169,7 @@ export class Passkey {
userAuthenticatorId,
userName,
userDisplayName,
authenticationResponse,
};
}

Expand Down
31 changes: 13 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,17 @@
estree-walker "^1.0.1"
picomatch "^2.2.2"

"@simplewebauthn/browser@^9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@simplewebauthn/browser/-/browser-9.0.1.tgz#46a12c2bcefcb199f7fcb6a7e883531cd6efde17"
integrity sha512-wD2WpbkaEP4170s13/HUxPcAV5y4ZXaKo1TfNklS5zDefPinIgXOpgz1kpEvobAsaLPa2KeH7AKKX/od1mrBJw==
"@simplewebauthn/browser@^10.0.0":
version "10.0.0"
resolved "https://registry.npmjs.org/@simplewebauthn/browser/-/browser-10.0.0.tgz#8305a57dacb35ab6a71a8b670c699ee7ef1c11c4"
integrity sha512-hG0JMZD+LiLUbpQcAjS4d+t4gbprE/dLYop/CkE01ugU/9sKXflxV5s0DRjdz3uNMFecatRfb4ZLG3XvF8m5zg==
dependencies:
"@simplewebauthn/types" "^9.0.1"
"@simplewebauthn/types" "^10.0.0"

"@simplewebauthn/types@^9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@simplewebauthn/types/-/types-9.0.1.tgz#3a68d50e63d8821cf2067de3324c68d5e8120d0c"
integrity sha512-tGSRP1QvsAvsJmnOlRQyw/mvK9gnPtjEc5fg2+m8n+QUa+D7rvrKkOYyfpy42GTs90X3RDOnqJgfHt+qO67/+w==

"@simplewebauthn/typescript-types@^8.0.0":
version "8.0.0"
resolved "https://registry.npmjs.org/@simplewebauthn/typescript-types/-/typescript-types-8.0.0.tgz#1698a7228aba880c5c1deba1f13a4f9fd8851cb3"
integrity sha512-d7Izb2H+LZJteXMkS8DmpAarD6mZdpIOu/av/yH4/u/3Pd6DKFLyBM3j8BMmUvUqpzvJvHARNrRfQYto58mtTQ==
"@simplewebauthn/types@^10.0.0":
version "10.0.0"
resolved "https://registry.npmjs.org/@simplewebauthn/types/-/types-10.0.0.tgz#a07259d42fbdff7a014473f78401d262b298ed8e"
integrity sha512-SFXke7xkgPRowY2E+8djKbdEznTVnD5R6GO7GPTthpHrokLvNKw8C3lFZypTxLI7KkCfGPfhtqB3d7OVGGa9jQ==

"@types/estree@0.0.39":
version "0.0.39"
Expand Down Expand Up @@ -1162,10 +1157,10 @@ type-fest@^0.20.2:
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==

typescript@^4.8.4:
version "4.8.4"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
typescript@^5.6.2:
version "5.6.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==

uri-js@^4.2.2:
version "4.4.1"
Expand Down

0 comments on commit 7d97f75

Please sign in to comment.