@absolutejs/auth 0.56.17 → 0.56.19
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/client/createAuthClient.d.ts +3 -2
- package/dist/client/index.js +9 -498
- package/dist/client/index.js.map +5 -20
- package/dist/client/react.js +6 -495
- package/dist/client/react.js.map +4 -19
- package/dist/client/solid.js +6 -495
- package/dist/client/solid.js.map +4 -19
- package/dist/client/svelte.js +6 -495
- package/dist/client/svelte.js.map +4 -19
- package/dist/client/vue.js +6 -495
- package/dist/client/vue.js.map +4 -19
- package/dist/manifest.d.ts +17 -1
- package/dist/manifest.js +1032 -6766
- package/dist/manifest.js.map +31 -31
- package/dist/manifest.json +10 -0
- package/package.json +15 -6
package/dist/client/react.js.map
CHANGED
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../
|
|
3
|
+
"sources": ["../src/client/react.ts", "../src/client/passkeyHelpers.ts", "../src/client/components/react/SignIn.ts", "../src/client/components/react/SignUp.ts", "../src/client/components/react/UserButton.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\n * Convert the given array buffer into a Base64URL-encoded string. Ideal for converting various\n * credential response ArrayBuffers to string for sending back to the server as JSON.\n *\n * Helper method to compliment `base64URLStringToBuffer`\n */\nexport function bufferToBase64URLString(buffer) {\n const bytes = new Uint8Array(buffer);\n let str = '';\n for (const charCode of bytes) {\n str += String.fromCharCode(charCode);\n }\n const base64String = btoa(str);\n return base64String.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=/g, '');\n}\n",
|
|
6
|
-
"/**\n * Convert from a Base64URL-encoded string to an Array Buffer. Best used when converting a\n * credential ID from a JSON string to an ArrayBuffer, like in allowCredentials or\n * excludeCredentials\n *\n * Helper method to compliment `bufferToBase64URLString`\n */\nexport function base64URLStringToBuffer(base64URLString) {\n // Convert from Base64URL to Base64\n const base64 = base64URLString.replace(/-/g, '+').replace(/_/g, '/');\n /**\n * Pad with '=' until it's a multiple of four\n * (4 - (85 % 4 = 1) = 3) % 4 = 3 padding\n * (4 - (86 % 4 = 2) = 2) % 4 = 2 padding\n * (4 - (87 % 4 = 3) = 1) % 4 = 1 padding\n * (4 - (88 % 4 = 0) = 4) % 4 = 0 padding\n */\n const padLength = (4 - (base64.length % 4)) % 4;\n const padded = base64.padEnd(base64.length + padLength, '=');\n // Convert to a binary string\n const binary = atob(padded);\n // Convert binary string to buffer\n const buffer = new ArrayBuffer(binary.length);\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return buffer;\n}\n",
|
|
7
|
-
"/**\n * Determine if the browser is capable of Webauthn\n */\nexport function browserSupportsWebAuthn() {\n return _browserSupportsWebAuthnInternals.stubThis(globalThis?.PublicKeyCredential !== undefined &&\n typeof globalThis.PublicKeyCredential === 'function');\n}\n/**\n * Make it possible to stub the return value during testing\n * @ignore Don't include this in docs output\n */\nexport const _browserSupportsWebAuthnInternals = {\n stubThis: (value) => value,\n};\n",
|
|
8
|
-
"import { base64URLStringToBuffer } from './base64URLStringToBuffer.js';\nexport function toPublicKeyCredentialDescriptor(descriptor) {\n const { id } = descriptor;\n return {\n ...descriptor,\n id: base64URLStringToBuffer(id),\n /**\n * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer\n * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports\n * are fine to pass to WebAuthn since browsers will recognize the new value.\n */\n transports: descriptor.transports,\n };\n}\n",
|
|
9
|
-
"/**\n * A simple test to determine if a hostname is a properly-formatted domain name\n *\n * A \"valid domain\" is defined here: https://url.spec.whatwg.org/#valid-domain\n *\n * Regex was originally sourced from here, then remixed to add punycode support:\n * https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html\n */\nexport function isValidDomain(hostname) {\n return (\n // Consider localhost valid as well since it's okay wrt Secure Contexts\n hostname === 'localhost' ||\n // Support punycode (ACE) or ascii labels and domains\n /^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(hostname));\n}\n",
|
|
10
|
-
"/**\n * A custom Error used to return a more nuanced error detailing _why_ one of the eight documented\n * errors in the spec was raised after calling `navigator.credentials.create()` or\n * `navigator.credentials.get()`:\n *\n * - `AbortError`\n * - `ConstraintError`\n * - `InvalidStateError`\n * - `NotAllowedError`\n * - `NotSupportedError`\n * - `SecurityError`\n * - `TypeError`\n * - `UnknownError`\n *\n * Error messages were determined through investigation of the spec to determine under which\n * scenarios a given error would be raised.\n */\nexport class WebAuthnError extends Error {\n constructor({ message, code, cause, name, }) {\n // @ts-ignore: help Rollup understand that `cause` is okay to set\n super(message, { cause });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name ?? cause.name;\n this.code = code;\n }\n}\n",
|
|
11
|
-
"import { isValidDomain } from './isValidDomain.js';\nimport { WebAuthnError } from './webAuthnError.js';\n/**\n * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.create()`\n */\nexport function identifyRegistrationError({ error, options, }) {\n const { publicKey } = options;\n if (!publicKey) {\n throw Error('options was missing required publicKey property');\n }\n if (error.name === 'AbortError') {\n if (options.signal instanceof AbortSignal) {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)\n return new WebAuthnError({\n message: 'Registration ceremony was sent an abort signal',\n code: 'ERROR_CEREMONY_ABORTED',\n cause: error,\n });\n }\n }\n else if (error.name === 'ConstraintError') {\n if (publicKey.authenticatorSelection?.requireResidentKey === true) {\n // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 4)\n return new WebAuthnError({\n message: 'Discoverable credentials were required but no available authenticator supported it',\n code: 'ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT',\n cause: error,\n });\n }\n else if (\n // @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024\n options.mediation === 'conditional' &&\n publicKey.authenticatorSelection?.userVerification === 'required') {\n // https://w3c.github.io/webauthn/#sctn-createCredential (Step 22.4)\n return new WebAuthnError({\n message: 'User verification was required during automatic registration but it could not be performed',\n code: 'ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE',\n cause: error,\n });\n }\n else if (publicKey.authenticatorSelection?.userVerification === 'required') {\n // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 5)\n return new WebAuthnError({\n message: 'User verification was required but no available authenticator supported it',\n code: 'ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT',\n cause: error,\n });\n }\n }\n else if (error.name === 'InvalidStateError') {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 20)\n // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 3)\n return new WebAuthnError({\n message: 'The authenticator was previously registered',\n code: 'ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED',\n cause: error,\n });\n }\n else if (error.name === 'NotAllowedError') {\n /**\n * Pass the error directly through. Platforms are overloading this error beyond what the spec\n * defines and we don't want to overwrite potentially useful error messages.\n */\n return new WebAuthnError({\n message: error.message,\n code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',\n cause: error,\n });\n }\n else if (error.name === 'NotSupportedError') {\n const validPubKeyCredParams = publicKey.pubKeyCredParams.filter((param) => param.type === 'public-key');\n if (validPubKeyCredParams.length === 0) {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 10)\n return new WebAuthnError({\n message: 'No entry in pubKeyCredParams was of type \"public-key\"',\n code: 'ERROR_MALFORMED_PUBKEYCREDPARAMS',\n cause: error,\n });\n }\n // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 2)\n return new WebAuthnError({\n message: 'No available authenticator supported any of the specified pubKeyCredParams algorithms',\n code: 'ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG',\n cause: error,\n });\n }\n else if (error.name === 'SecurityError') {\n const effectiveDomain = globalThis.location.hostname;\n if (!isValidDomain(effectiveDomain)) {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 7)\n return new WebAuthnError({\n message: `${globalThis.location.hostname} is an invalid domain`,\n code: 'ERROR_INVALID_DOMAIN',\n cause: error,\n });\n }\n else if (publicKey.rp.id !== effectiveDomain) {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 8)\n return new WebAuthnError({\n message: `The RP ID \"${publicKey.rp.id}\" is invalid for this domain`,\n code: 'ERROR_INVALID_RP_ID',\n cause: error,\n });\n }\n }\n else if (error.name === 'TypeError') {\n if (publicKey.user.id.byteLength < 1 || publicKey.user.id.byteLength > 64) {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 5)\n return new WebAuthnError({\n message: 'User ID was not between 1 and 64 characters',\n code: 'ERROR_INVALID_USER_ID_LENGTH',\n cause: error,\n });\n }\n }\n else if (error.name === 'UnknownError') {\n // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 1)\n // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 8)\n return new WebAuthnError({\n message: 'The authenticator was unable to process the specified options, or could not create a new credential',\n code: 'ERROR_AUTHENTICATOR_GENERAL_ERROR',\n cause: error,\n });\n }\n return error;\n}\n",
|
|
12
|
-
"class BaseWebAuthnAbortService {\n constructor() {\n Object.defineProperty(this, \"controller\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n createNewAbortSignal() {\n // Abort any existing calls to navigator.credentials.create() or navigator.credentials.get()\n if (this.controller) {\n const abortError = new Error('Cancelling existing WebAuthn API call for new one');\n abortError.name = 'AbortError';\n this.controller.abort(abortError);\n }\n const newController = new AbortController();\n this.controller = newController;\n return newController.signal;\n }\n cancelCeremony() {\n if (this.controller) {\n const abortError = new Error('Manually cancelling existing WebAuthn API call');\n abortError.name = 'AbortError';\n this.controller.abort(abortError);\n this.controller = undefined;\n }\n }\n}\n/**\n * A service singleton to help ensure that only a single WebAuthn ceremony is active at a time.\n *\n * Users of **@simplewebauthn/browser** shouldn't typically need to use this, but it can help e.g.\n * developers building projects that use client-side routing to better control the behavior of\n * their UX in response to router navigation events.\n */\nexport const WebAuthnAbortService = new BaseWebAuthnAbortService();\n",
|
|
13
|
-
"const attachments = ['cross-platform', 'platform'];\n/**\n * If possible coerce a `string` value into a known `AuthenticatorAttachment`\n */\nexport function toAuthenticatorAttachment(attachment) {\n if (!attachment) {\n return;\n }\n if (attachments.indexOf(attachment) < 0) {\n return;\n }\n return attachment;\n}\n",
|
|
14
|
-
"import { bufferToBase64URLString } from '../helpers/bufferToBase64URLString.js';\nimport { base64URLStringToBuffer } from '../helpers/base64URLStringToBuffer.js';\nimport { browserSupportsWebAuthn } from '../helpers/browserSupportsWebAuthn.js';\nimport { toPublicKeyCredentialDescriptor } from '../helpers/toPublicKeyCredentialDescriptor.js';\nimport { identifyRegistrationError } from '../helpers/identifyRegistrationError.js';\nimport { WebAuthnAbortService } from '../helpers/webAuthnAbortService.js';\nimport { toAuthenticatorAttachment } from '../helpers/toAuthenticatorAttachment.js';\n/**\n * Begin authenticator \"registration\" via WebAuthn attestation\n *\n * @param optionsJSON Output from **@simplewebauthn/server**'s `generateRegistrationOptions()`\n * @param useAutoRegister (Optional) Try to silently create a passkey with the password manager that the user just signed in with. Defaults to `false`.\n */\nexport async function startRegistration(options) {\n // @ts-ignore: Intentionally check for old call structure to warn about improper API call\n if (!options.optionsJSON && options.challenge) {\n console.warn('startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.');\n // @ts-ignore: Reassign the options, passed in as a positional argument, to the expected variable\n options = { optionsJSON: options };\n }\n const { optionsJSON, useAutoRegister = false } = options;\n if (!browserSupportsWebAuthn()) {\n throw new Error('WebAuthn is not supported in this browser');\n }\n // We need to convert some values to Uint8Arrays before passing the credentials to the navigator\n const publicKey = {\n ...optionsJSON,\n challenge: base64URLStringToBuffer(optionsJSON.challenge),\n user: {\n ...optionsJSON.user,\n id: base64URLStringToBuffer(optionsJSON.user.id),\n },\n excludeCredentials: optionsJSON.excludeCredentials?.map(toPublicKeyCredentialDescriptor),\n };\n // Prepare options for `.create()`\n const createOptions = {};\n /**\n * Try to use conditional create to register a passkey for the user with the password manager\n * the user just used to authenticate with. The user won't be shown any prominent UI by the\n * browser.\n */\n if (useAutoRegister) {\n // @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024\n createOptions.mediation = 'conditional';\n }\n // Finalize options\n createOptions.publicKey = publicKey;\n // Set up the ability to cancel this request if the user attempts another\n createOptions.signal = WebAuthnAbortService.createNewAbortSignal();\n // Wait for the user to complete attestation\n let credential;\n try {\n credential = (await navigator.credentials.create(createOptions));\n }\n catch (err) {\n throw identifyRegistrationError({ error: err, options: createOptions });\n }\n if (!credential) {\n throw new Error('Registration was not completed');\n }\n const { id, rawId, response, type } = credential;\n // Continue to play it safe with `getTransports()` for now, even when L3 types say it's required\n let transports = undefined;\n if (typeof response.getTransports === 'function') {\n transports = response.getTransports();\n }\n // L3 says this is required, but browser and webview support are still not guaranteed.\n let responsePublicKeyAlgorithm = undefined;\n if (typeof response.getPublicKeyAlgorithm === 'function') {\n try {\n responsePublicKeyAlgorithm = response.getPublicKeyAlgorithm();\n }\n catch (error) {\n warnOnBrokenImplementation('getPublicKeyAlgorithm()', error);\n }\n }\n let responsePublicKey = undefined;\n if (typeof response.getPublicKey === 'function') {\n try {\n const _publicKey = response.getPublicKey();\n if (_publicKey !== null) {\n responsePublicKey = bufferToBase64URLString(_publicKey);\n }\n }\n catch (error) {\n warnOnBrokenImplementation('getPublicKey()', error);\n }\n }\n // L3 says this is required, but browser and webview support are still not guaranteed.\n let responseAuthenticatorData;\n if (typeof response.getAuthenticatorData === 'function') {\n try {\n responseAuthenticatorData = bufferToBase64URLString(response.getAuthenticatorData());\n }\n catch (error) {\n warnOnBrokenImplementation('getAuthenticatorData()', error);\n }\n }\n return {\n id,\n rawId: bufferToBase64URLString(rawId),\n response: {\n attestationObject: bufferToBase64URLString(response.attestationObject),\n clientDataJSON: bufferToBase64URLString(response.clientDataJSON),\n transports,\n publicKeyAlgorithm: responsePublicKeyAlgorithm,\n publicKey: responsePublicKey,\n authenticatorData: responseAuthenticatorData,\n },\n type,\n clientExtensionResults: credential.getClientExtensionResults(),\n authenticatorAttachment: toAuthenticatorAttachment(credential.authenticatorAttachment),\n };\n}\n/**\n * Visibly warn when we detect an issue related to a passkey provider intercepting WebAuthn API\n * calls\n */\nfunction warnOnBrokenImplementation(methodName, cause) {\n console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${methodName}. You should report this error to them.\\n`, cause);\n}\n",
|
|
15
|
-
"import { browserSupportsWebAuthn } from './browserSupportsWebAuthn.js';\n/**\n * Determine if the browser supports conditional UI, so that WebAuthn credentials can\n * be shown to the user in the browser's typical password autofill popup.\n */\nexport function browserSupportsWebAuthnAutofill() {\n if (!browserSupportsWebAuthn()) {\n return _browserSupportsWebAuthnAutofillInternals.stubThis(new Promise((resolve) => resolve(false)));\n }\n /**\n * I don't like the `as unknown` here but there's a `declare var PublicKeyCredential` in\n * TS' DOM lib that's making it difficult for me to just go `as PublicKeyCredentialFuture` as I\n * want. I think I'm fine with this for now since it's _supposed_ to be temporary, until TS types\n * have a chance to catch up.\n */\n const globalPublicKeyCredential = globalThis\n .PublicKeyCredential;\n if (globalPublicKeyCredential?.isConditionalMediationAvailable === undefined) {\n return _browserSupportsWebAuthnAutofillInternals.stubThis(new Promise((resolve) => resolve(false)));\n }\n return _browserSupportsWebAuthnAutofillInternals.stubThis(globalPublicKeyCredential.isConditionalMediationAvailable());\n}\n// Make it possible to stub the return value during testing\nexport const _browserSupportsWebAuthnAutofillInternals = {\n stubThis: (value) => value,\n};\n",
|
|
16
|
-
"import { isValidDomain } from './isValidDomain.js';\nimport { WebAuthnError } from './webAuthnError.js';\n/**\n * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.get()`\n */\nexport function identifyAuthenticationError({ error, options, }) {\n const { publicKey } = options;\n if (!publicKey) {\n throw Error('options was missing required publicKey property');\n }\n if (error.name === 'AbortError') {\n if (options.signal instanceof AbortSignal) {\n // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)\n return new WebAuthnError({\n message: 'Authentication ceremony was sent an abort signal',\n code: 'ERROR_CEREMONY_ABORTED',\n cause: error,\n });\n }\n }\n else if (error.name === 'NotAllowedError') {\n /**\n * Pass the error directly through. Platforms are overloading this error beyond what the spec\n * defines and we don't want to overwrite potentially useful error messages.\n */\n return new WebAuthnError({\n message: error.message,\n code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',\n cause: error,\n });\n }\n else if (error.name === 'SecurityError') {\n const effectiveDomain = globalThis.location.hostname;\n if (!isValidDomain(effectiveDomain)) {\n // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 5)\n return new WebAuthnError({\n message: `${globalThis.location.hostname} is an invalid domain`,\n code: 'ERROR_INVALID_DOMAIN',\n cause: error,\n });\n }\n else if (publicKey.rpId !== effectiveDomain) {\n // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 6)\n return new WebAuthnError({\n message: `The RP ID \"${publicKey.rpId}\" is invalid for this domain`,\n code: 'ERROR_INVALID_RP_ID',\n cause: error,\n });\n }\n }\n else if (error.name === 'UnknownError') {\n // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 1)\n // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 12)\n return new WebAuthnError({\n message: 'The authenticator was unable to process the specified options, or could not create a new assertion signature',\n code: 'ERROR_AUTHENTICATOR_GENERAL_ERROR',\n cause: error,\n });\n }\n return error;\n}\n",
|
|
17
|
-
"import { bufferToBase64URLString } from '../helpers/bufferToBase64URLString.js';\nimport { base64URLStringToBuffer } from '../helpers/base64URLStringToBuffer.js';\nimport { browserSupportsWebAuthn } from '../helpers/browserSupportsWebAuthn.js';\nimport { browserSupportsWebAuthnAutofill } from '../helpers/browserSupportsWebAuthnAutofill.js';\nimport { toPublicKeyCredentialDescriptor } from '../helpers/toPublicKeyCredentialDescriptor.js';\nimport { identifyAuthenticationError } from '../helpers/identifyAuthenticationError.js';\nimport { WebAuthnAbortService } from '../helpers/webAuthnAbortService.js';\nimport { toAuthenticatorAttachment } from '../helpers/toAuthenticatorAttachment.js';\n/**\n * Begin authenticator \"login\" via WebAuthn assertion\n *\n * @param optionsJSON Output from **@simplewebauthn/server**'s `generateAuthenticationOptions()`\n * @param useBrowserAutofill (Optional) Initialize conditional UI to enable logging in via browser autofill prompts. Defaults to `false`.\n * @param verifyBrowserAutofillInput (Optional) Ensure a suitable `<input>` element is present when `useBrowserAutofill` is `true`. Defaults to `true`.\n */\nexport async function startAuthentication(options) {\n // @ts-ignore: Intentionally check for old call structure to warn about improper API call\n if (!options.optionsJSON && options.challenge) {\n console.warn('startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.');\n // @ts-ignore: Reassign the options, passed in as a positional argument, to the expected variable\n options = { optionsJSON: options };\n }\n const { optionsJSON, useBrowserAutofill = false, verifyBrowserAutofillInput = true, } = options;\n if (!browserSupportsWebAuthn()) {\n throw new Error('WebAuthn is not supported in this browser');\n }\n // We need to avoid passing empty array to avoid blocking retrieval\n // of public key\n let allowCredentials;\n if (optionsJSON.allowCredentials?.length !== 0) {\n allowCredentials = optionsJSON.allowCredentials?.map(toPublicKeyCredentialDescriptor);\n }\n // We need to convert some values to Uint8Arrays before passing the credentials to the navigator\n const publicKey = {\n ...optionsJSON,\n challenge: base64URLStringToBuffer(optionsJSON.challenge),\n allowCredentials,\n };\n // Prepare options for `.get()`\n const getOptions = {};\n /**\n * Set up the page to prompt the user to select a credential for authentication via the browser's\n * input autofill mechanism.\n */\n if (useBrowserAutofill) {\n if (!(await browserSupportsWebAuthnAutofill())) {\n throw Error('Browser does not support WebAuthn autofill');\n }\n // Check for an <input> with \"webauthn\" in its `autocomplete` attribute\n const eligibleInputs = document.querySelectorAll(\"input[autocomplete$='webauthn']\");\n // WebAuthn autofill requires at least one valid input\n if (eligibleInputs.length < 1 && verifyBrowserAutofillInput) {\n throw Error('No <input> with \"webauthn\" as the only or last value in its `autocomplete` attribute was detected');\n }\n // `CredentialMediationRequirement` doesn't know about \"conditional\" yet as of\n // typescript@4.6.3\n getOptions.mediation = 'conditional';\n // Conditional UI requires an empty allow list\n publicKey.allowCredentials = [];\n }\n // Finalize options\n getOptions.publicKey = publicKey;\n // Set up the ability to cancel this request if the user attempts another\n getOptions.signal = WebAuthnAbortService.createNewAbortSignal();\n // Wait for the user to complete assertion\n let credential;\n try {\n credential = (await navigator.credentials.get(getOptions));\n }\n catch (err) {\n throw identifyAuthenticationError({ error: err, options: getOptions });\n }\n if (!credential) {\n throw new Error('Authentication was not completed');\n }\n const { id, rawId, response, type } = credential;\n let userHandle = undefined;\n if (response.userHandle) {\n userHandle = bufferToBase64URLString(response.userHandle);\n }\n // Convert values to base64 to make it easier to send back to the server\n return {\n id,\n rawId: bufferToBase64URLString(rawId),\n response: {\n authenticatorData: bufferToBase64URLString(response.authenticatorData),\n clientDataJSON: bufferToBase64URLString(response.clientDataJSON),\n signature: bufferToBase64URLString(response.signature),\n userHandle,\n },\n type,\n clientExtensionResults: credential.getClientExtensionResults(),\n authenticatorAttachment: toAuthenticatorAttachment(credential.authenticatorAttachment),\n };\n}\n",
|
|
18
|
-
"import { browserSupportsWebAuthn } from './browserSupportsWebAuthn.js';\n/**\n * Determine whether the browser can communicate with a built-in authenticator, like\n * Touch ID, Android fingerprint scanner, or Windows Hello.\n *\n * This method will _not_ be able to tell you the name of the platform authenticator.\n */\nexport function platformAuthenticatorIsAvailable() {\n if (!browserSupportsWebAuthn()) {\n return new Promise((resolve) => resolve(false));\n }\n return PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();\n}\n",
|
|
19
|
-
"export * from './methods/startRegistration.js';\nexport * from './methods/startAuthentication.js';\nexport * from './helpers/browserSupportsWebAuthn.js';\nexport * from './helpers/platformAuthenticatorIsAvailable.js';\nexport * from './helpers/browserSupportsWebAuthnAutofill.js';\nexport * from './helpers/base64URLStringToBuffer.js';\nexport * from './helpers/bufferToBase64URLString.js';\nexport * from './helpers/webAuthnAbortService.js';\nexport * from './helpers/webAuthnError.js';\nexport * from './types/index.js';\n",
|
|
20
5
|
"// Thin React hooks over `createAuthClient`. Same `{ data, error }` shape; the hook adds\n// `isPending` state and a stable mutator. Bring your own form/UI — these are primitives, not\n// components. Composables (Vue/Solid/Svelte) will follow the same pattern over the same client.\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport type { AuthClient, AuthClientError } from './createAuthClient';\nimport {\n\trunConditionalAuthentication,\n\trunPasskeyRegistration\n} from './passkeyHelpers';\n\ntype Mutator<Args, Data> = (\n\targs: Args\n) => Promise<{ data: Data | null; error: AuthClientError | null }>;\n\ntype MutationState<Args, Data> = {\n\tdata: Data | null;\n\terror: AuthClientError | null;\n\tisPending: boolean;\n\tmutate: Mutator<Args, Data>;\n\treset: () => void;\n};\n\n// Generic mutation hook. The other hooks are 1–2 line specializations of this — kept private\n// here so consumers see the cohesive named API and don't depend on this shape.\nconst useMutation = <Args, Data>(\n\trun: Mutator<Args, Data>\n): MutationState<Args, Data> => {\n\tconst [data, setData] = useState<Data | null>(null);\n\tconst [error, setError] = useState<AuthClientError | null>(null);\n\tconst [isPending, setIsPending] = useState(false);\n\tconst mountedRef = useRef(true);\n\tuseEffect(\n\t\t() => () => {\n\t\t\tmountedRef.current = false;\n\t\t},\n\t\t[]\n\t);\n\n\tconst mutate: Mutator<Args, Data> = useCallback(\n\t\tasync (args) => {\n\t\t\tsetIsPending(true);\n\t\t\tsetError(null);\n\t\t\tconst result = await run(args);\n\t\t\tif (mountedRef.current) {\n\t\t\t\tsetData(result.data);\n\t\t\t\tsetError(result.error);\n\t\t\t\tsetIsPending(false);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t},\n\t\t[run]\n\t);\n\n\tconst reset = useCallback(() => {\n\t\tsetData(null);\n\t\tsetError(null);\n\t\tsetIsPending(false);\n\t}, []);\n\n\treturn { data, error, isPending, mutate, reset };\n};\n\nexport const useMagicLink = (client: AuthClient) =>\n\tuseMutation(client.passwordless.requestMagicLink);\n\n// Conditional-UI WebAuthn (\"passkey autofill\"). Mount once on the sign-in page with an\n// `<input autocomplete=\"username webauthn\" />` and call `start()` in an effect; the\n// browser surfaces saved passkeys directly in the autofill dropdown. The result feeds\n// the same authenticate-verify route the click-driven flow uses. `cancel()` aborts an\n// in-flight ceremony (e.g. when the user clicks the password tab).\nexport const usePasskeyAutofill = (client: AuthClient) => {\n\tconst [data, setData] = useState<{ status: 'authenticated' } | null>(null);\n\tconst [error, setError] = useState<AuthClientError | null>(null);\n\tconst [isPending, setIsPending] = useState(false);\n\tconst mountedRef = useRef(true);\n\tuseEffect(\n\t\t() => () => {\n\t\t\tmountedRef.current = false;\n\t\t},\n\t\t[]\n\t);\n\n\tconst start = useCallback(async () => {\n\t\tsetIsPending(true);\n\t\tsetError(null);\n\t\tconst result = await runConditionalAuthentication(client);\n\t\tif (mountedRef.current) {\n\t\t\tsetData(result.data);\n\t\t\tsetError(result.error);\n\t\t\tsetIsPending(false);\n\t\t}\n\t}, [client]);\n\n\tconst cancel = useCallback(() => {\n\t\t// startAuthentication doesn't expose an AbortController in @simplewebauthn/browser;\n\t\t// best-effort cancel is to clear the pending flag. The Promise will still resolve\n\t\t// when the browser autofill dismisses; mountedRef gates the result write.\n\t\tsetIsPending(false);\n\t}, []);\n\n\treturn { cancel, data, error, isPending, start };\n};\n\n// \"Upgrade to passkey\" prompt — query whether the signed-in user has registered any\n// passkeys yet; surface `shouldPrompt: true` when they don't, plus a `register()` that\n// runs the registration ceremony and refetches the list. Wire `shouldPrompt` to your CTA\n// component so password users see \"save a passkey to this device for next time?\" after\n// they sign in.\nexport const useUpgradeToPasskey = (client: AuthClient) => {\n\tconst [passkeys, setPasskeys] = useState<unknown[] | null>(null);\n\tconst [error, setError] = useState<AuthClientError | null>(null);\n\tconst [isPending, setIsPending] = useState(true);\n\tconst mountedRef = useRef(true);\n\tuseEffect(\n\t\t() => () => {\n\t\t\tmountedRef.current = false;\n\t\t},\n\t\t[]\n\t);\n\n\tconst refetch = useCallback(async () => {\n\t\tsetIsPending(true);\n\t\tconst result = await client.passkeys.list();\n\t\tif (mountedRef.current) {\n\t\t\tsetPasskeys(result.data);\n\t\t\tsetError(result.error);\n\t\t\tsetIsPending(false);\n\t\t}\n\t}, [client]);\n\n\tuseEffect(() => {\n\t\tvoid refetch();\n\t}, [refetch]);\n\n\tconst register = useCallback(async () => {\n\t\tconst result = await runPasskeyRegistration(client);\n\t\tif (result.error === null) await refetch();\n\n\t\treturn result;\n\t}, [client, refetch]);\n\n\tconst shouldPrompt = passkeys !== null && passkeys.length === 0;\n\n\treturn { error, isPending, passkeys, refetch, register, shouldPrompt };\n};\n\nexport const useMfaChallenge = (client: AuthClient) =>\n\tuseMutation(client.mfa.challenge);\n\nexport const usePasswordReset = (client: AuthClient) =>\n\tuseMutation(client.passwordReset.request);\n\n// Query hook for the user's active sessions; refetch() reruns it. The shape matches the\n// mutation hooks closely (isPending/error/data) so the consumer can render one way.\nexport const useSessions = (client: AuthClient) => {\n\tconst [data, setData] = useState<unknown[] | null>(null);\n\tconst [error, setError] = useState<AuthClientError | null>(null);\n\tconst [isPending, setIsPending] = useState(true);\n\tconst mountedRef = useRef(true);\n\tuseEffect(\n\t\t() => () => {\n\t\t\tmountedRef.current = false;\n\t\t},\n\t\t[]\n\t);\n\n\tconst refetch = useCallback(async () => {\n\t\tsetIsPending(true);\n\t\tconst result = await client.sessions.list();\n\t\tif (mountedRef.current) {\n\t\t\tsetData(result.data);\n\t\t\tsetError(result.error);\n\t\t\tsetIsPending(false);\n\t\t}\n\t}, [client]);\n\n\tuseEffect(() => {\n\t\tvoid refetch();\n\t}, [refetch]);\n\n\tconst revoke = useCallback(\n\t\tasync (sessionId: string) => {\n\t\t\tconst result = await client.sessions.revoke(sessionId);\n\t\t\tif (result.error === null) await refetch();\n\n\t\t\treturn result;\n\t\t},\n\t\t[client, refetch]\n\t);\n\n\treturn { data, error, isPending, refetch, revoke };\n};\n\nexport const useSignIn = (client: AuthClient) =>\n\tuseMutation(client.signIn.email);\n\nexport const useSignOut = (client: AuthClient) => useMutation(client.signOut);\n\nexport const useSignUp = (client: AuthClient) =>\n\tuseMutation(client.signUp.email);\n\n// Drop-in headless components — minimal default markup, fully\n// restyleable via the `classNames` prop. Every element carries a\n// `data-abs-auth=…` attribute the consumer can target from CSS. Useful\n// when migrating off Clerk's `<UserButton />` / `<SignIn />`: pass\n// `classNames` to match your existing visual treatment, drop the\n// vendor dep.\nexport { SignIn, type SignInProps } from './components/react/SignIn';\nexport { SignUp, type SignUpProps } from './components/react/SignUp';\nexport {\n\tUserButton,\n\ttype UserButtonItem,\n\ttype UserButtonProps,\n\ttype UserButtonUser\n} from './components/react/UserButton';\n",
|
|
21
|
-
"// Framework-agnostic glue between the WebAuthn ceremonies the package exposes via\n// `createAuthClient` and the browser's `navigator.credentials.{get,create}` APIs.\n// Used by the framework composables (`./react`, `./vue`, `./solid`, `./svelte`) so the\n// React + Vue + Solid + Svelte hooks all share the same imperative core; the framework\n// wrappers only add reactivity.\n//\n// `@simplewebauthn/browser` is an OPTIONAL peer dep — consumers that don't import any\n// of the passkey composables never load it. We dynamic-import lazily on first call so a\n// non-passkey consumer pays nothing at module load.\n\nimport type { AuthClient, AuthClientError } from './createAuthClient';\n\
|
|
6
|
+
"// Framework-agnostic glue between the WebAuthn ceremonies the package exposes via\n// `createAuthClient` and the browser's `navigator.credentials.{get,create}` APIs.\n// Used by the framework composables (`./react`, `./vue`, `./solid`, `./svelte`) so the\n// React + Vue + Solid + Svelte hooks all share the same imperative core; the framework\n// wrappers only add reactivity.\n//\n// `@simplewebauthn/browser` is an OPTIONAL peer dep — consumers that don't import any\n// of the passkey composables never load it. We dynamic-import lazily on first call so a\n// non-passkey consumer pays nothing at module load.\n\nimport type { AuthClient, AuthClientError } from './createAuthClient';\n\nconst loadBrowser = () => import('@simplewebauthn/browser');\n\nconst errorFor = (caught: unknown): AuthClientError => ({\n\tbody: null,\n\tmessage: caught instanceof Error ? caught.message : 'webauthn_failed',\n\tstatus: 0\n});\n\n// Runs the WebAuthn authentication ceremony in conditional-UI mode (the browser surfaces\n// saved passkeys directly via autofill on a focused `<input autocomplete=\"webauthn\">`).\n// Returns the same `{ data, error }` shape `createAuthClient` already uses, so composables\n// can pipe the result into their state setters unchanged.\nexport const runConditionalAuthentication = async (client: AuthClient) => {\n\tif (typeof window === 'undefined' || !window.PublicKeyCredential) {\n\t\treturn {\n\t\t\tdata: null,\n\t\t\terror: errorFor(new Error('webauthn_unavailable'))\n\t\t};\n\t}\n\tconst options = await client.passkeys.authenticateOptions();\n\tif (options.error) return { data: null, error: options.error };\n\ttry {\n\t\tconst { startAuthentication } = await loadBrowser();\n\t\tconst credential = await startAuthentication({\n\t\t\toptionsJSON: options.data,\n\t\t\tuseBrowserAutofill: true\n\t\t});\n\n\t\treturn client.passkeys.authenticateVerify(credential);\n\t} catch (caught) {\n\t\treturn { data: null, error: errorFor(caught) };\n\t}\n};\n\n// Runs the WebAuthn registration ceremony for the currently authenticated user. Used by\n// the \"upgrade to passkey\" prompt — after a password sign-in, surface a \"save a passkey\n// to this device for next time?\" CTA.\nexport const runPasskeyRegistration = async (client: AuthClient) => {\n\tif (typeof window === 'undefined' || !window.PublicKeyCredential) {\n\t\treturn {\n\t\t\tdata: null,\n\t\t\terror: errorFor(new Error('webauthn_unavailable'))\n\t\t};\n\t}\n\tconst options = await client.passkeys.registerOptions();\n\tif (options.error) return { data: null, error: options.error };\n\ttry {\n\t\tconst { startRegistration } = await loadBrowser();\n\t\tconst credential = await startRegistration({\n\t\t\toptionsJSON: options.data\n\t\t});\n\n\t\treturn client.passkeys.registerVerify(credential);\n\t} catch (caught) {\n\t\treturn { data: null, error: errorFor(caught) };\n\t}\n};\n",
|
|
22
7
|
"// Drop-in sign-in component for React. Headless — minimal default\n// markup, every element has a stable `data-abs-auth` attribute the\n// consumer can target from their own CSS. Doesn't bundle styles;\n// consumers bring their own (Tailwind class lists, CSS-in-JS,\n// vanilla CSS, whatever).\n//\n// Usage:\n//\n// import { SignIn } from '@absolutejs/auth/react';\n//\n// <SignIn\n// client={authClient}\n// onSuccess={() => router.push('/dashboard')}\n// providers={['google', 'github']}\n// />\n//\n// The component renders an email/password form, calls the package's\n// useSignIn hook on submit, and emits onSuccess/onError. OAuth provider\n// buttons (when `providers` is set) are real anchor links to\n// `/oauth2/authorize?provider=…` — the consumer's existing OAuth\n// roundtrip + onCallbackSuccess hook is what handles the rest.\nimport { createElement, type FormEvent } from 'react';\nimport { useState } from 'react';\nimport type { AuthClient, AuthClientError } from '../../createAuthClient';\nimport { useSignIn } from '../../react';\n\ntype AuthnSuccess = {\n\tpasswordCompromised?: boolean;\n\tstatus: 'authenticated' | 'mfa_required';\n};\n\nexport type SignInProps = {\n\tclient: AuthClient;\n\tclassNames?: {\n\t\tbutton?: string;\n\t\tcontainer?: string;\n\t\tdivider?: string;\n\t\terror?: string;\n\t\tfield?: string;\n\t\tinput?: string;\n\t\tlabel?: string;\n\t\toauthButton?: string;\n\t\toauthGrid?: string;\n\t};\n\temailLabel?: string;\n\tonError?: (error: AuthClientError) => void;\n\tonSuccess?: (result: AuthnSuccess) => void;\n\tpasswordLabel?: string;\n\t// OAuth provider keys (lowercase, matching your auth() config) to render\n\t// as buttons above the email/password form. e.g. ['google', 'github'].\n\tproviders?: string[];\n\tsubmitLabel?: string;\n};\n\nexport const SignIn = ({\n\tclient,\n\tclassNames,\n\temailLabel = 'Email',\n\tonError,\n\tonSuccess,\n\tpasswordLabel = 'Password',\n\tproviders,\n\tsubmitLabel = 'Sign in'\n}: SignInProps) => {\n\tconst [email, setEmail] = useState('');\n\tconst [password, setPassword] = useState('');\n\tconst { error, isPending, mutate } = useSignIn(client);\n\n\tconst handleSubmit = async (event: FormEvent<HTMLFormElement>) => {\n\t\tevent.preventDefault();\n\t\tconst result = await mutate({ email, password });\n\t\tif (result.error !== null) {\n\t\t\tonError?.(result.error);\n\n\t\t\treturn;\n\t\t}\n\t\tif (result.data !== null) onSuccess?.(result.data);\n\t};\n\n\tconst oauthButtons =\n\t\tproviders === undefined || providers.length === 0\n\t\t\t? null\n\t\t\t: createElement(\n\t\t\t\t\t'div',\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: classNames?.oauthGrid,\n\t\t\t\t\t\t'data-abs-auth': 'oauth-grid'\n\t\t\t\t\t},\n\t\t\t\t\t...providers.map((provider) =>\n\t\t\t\t\t\tcreateElement(\n\t\t\t\t\t\t\t'a',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclassName: classNames?.oauthButton,\n\t\t\t\t\t\t\t\t'data-abs-auth-provider': provider,\n\t\t\t\t\t\t\t\thref: `/oauth2/authorize?provider=${provider}`,\n\t\t\t\t\t\t\t\tkey: provider\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t`Continue with ${provider}`\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tcreateElement(\n\t\t\t\t\t\t'div',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tclassName: classNames?.divider,\n\t\t\t\t\t\t\t'data-abs-auth': 'divider'\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'or'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\tconst errorBanner =\n\t\terror === null\n\t\t\t? null\n\t\t\t: createElement(\n\t\t\t\t\t'p',\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: classNames?.error,\n\t\t\t\t\t\t'data-abs-auth': 'error',\n\t\t\t\t\t\trole: 'alert'\n\t\t\t\t\t},\n\t\t\t\t\terror.message\n\t\t\t\t);\n\n\treturn createElement(\n\t\t'form',\n\t\t{\n\t\t\tclassName: classNames?.container,\n\t\t\t'data-abs-auth': 'sign-in',\n\t\t\tonSubmit: handleSubmit\n\t\t},\n\t\toauthButtons,\n\t\tcreateElement(\n\t\t\t'label',\n\t\t\t{ className: classNames?.field, 'data-abs-auth': 'email-field' },\n\t\t\tcreateElement('span', { className: classNames?.label }, emailLabel),\n\t\t\tcreateElement('input', {\n\t\t\t\tautoComplete: 'username webauthn',\n\t\t\t\tclassName: classNames?.input,\n\t\t\t\tname: 'email',\n\t\t\t\tonChange: (event: { currentTarget: HTMLInputElement }) =>\n\t\t\t\t\tsetEmail(event.currentTarget.value),\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'email',\n\t\t\t\tvalue: email\n\t\t\t})\n\t\t),\n\t\tcreateElement(\n\t\t\t'label',\n\t\t\t{ className: classNames?.field, 'data-abs-auth': 'password-field' },\n\t\t\tcreateElement(\n\t\t\t\t'span',\n\t\t\t\t{ className: classNames?.label },\n\t\t\t\tpasswordLabel\n\t\t\t),\n\t\t\tcreateElement('input', {\n\t\t\t\tautoComplete: 'current-password',\n\t\t\t\tclassName: classNames?.input,\n\t\t\t\tminLength: 12,\n\t\t\t\tname: 'password',\n\t\t\t\tonChange: (event: { currentTarget: HTMLInputElement }) =>\n\t\t\t\t\tsetPassword(event.currentTarget.value),\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'password',\n\t\t\t\tvalue: password\n\t\t\t})\n\t\t),\n\t\terrorBanner,\n\t\tcreateElement(\n\t\t\t'button',\n\t\t\t{\n\t\t\t\tclassName: classNames?.button,\n\t\t\t\t'data-abs-auth': 'submit',\n\t\t\t\tdisabled: isPending,\n\t\t\t\ttype: 'submit'\n\t\t\t},\n\t\t\tisPending ? 'Signing in…' : submitLabel\n\t\t)\n\t);\n};\n",
|
|
23
8
|
"// Drop-in sign-up component for React. Mirrors SignIn but calls\n// useSignUp + advertises the 12-character minimum-length we enforce\n// at the package level. See SignIn for the design rationale + the\n// data-abs-auth attribute hook system.\nimport { createElement, type FormEvent } from 'react';\nimport { useState } from 'react';\nimport type { AuthClient, AuthClientError } from '../../createAuthClient';\nimport { useSignUp } from '../../react';\n\ntype SignUpSuccess =\n\t| { status: 'authenticated' }\n\t| { status: 'verification_required' };\n\nexport type SignUpProps = {\n\tclient: AuthClient;\n\tclassNames?: {\n\t\tbutton?: string;\n\t\tcontainer?: string;\n\t\terror?: string;\n\t\tfield?: string;\n\t\tinput?: string;\n\t\tlabel?: string;\n\t};\n\temailLabel?: string;\n\tonError?: (error: AuthClientError) => void;\n\tonSuccess?: (result: SignUpSuccess) => void;\n\tpasswordLabel?: string;\n\tsubmitLabel?: string;\n};\n\nexport const SignUp = ({\n\tclient,\n\tclassNames,\n\temailLabel = 'Email',\n\tonError,\n\tonSuccess,\n\tpasswordLabel = 'Password (12+ characters)',\n\tsubmitLabel = 'Create account'\n}: SignUpProps) => {\n\tconst [email, setEmail] = useState('');\n\tconst [password, setPassword] = useState('');\n\tconst { error, isPending, mutate } = useSignUp(client);\n\n\tconst handleSubmit = async (event: FormEvent<HTMLFormElement>) => {\n\t\tevent.preventDefault();\n\t\tconst result = await mutate({ email, password });\n\t\tif (result.error !== null) {\n\t\t\tonError?.(result.error);\n\n\t\t\treturn;\n\t\t}\n\t\tif (result.data !== null) onSuccess?.(result.data);\n\t};\n\n\tconst errorBanner =\n\t\terror === null\n\t\t\t? null\n\t\t\t: createElement(\n\t\t\t\t\t'p',\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: classNames?.error,\n\t\t\t\t\t\t'data-abs-auth': 'error',\n\t\t\t\t\t\trole: 'alert'\n\t\t\t\t\t},\n\t\t\t\t\terror.message\n\t\t\t\t);\n\n\treturn createElement(\n\t\t'form',\n\t\t{\n\t\t\tclassName: classNames?.container,\n\t\t\t'data-abs-auth': 'sign-up',\n\t\t\tonSubmit: handleSubmit\n\t\t},\n\t\tcreateElement(\n\t\t\t'label',\n\t\t\t{ className: classNames?.field, 'data-abs-auth': 'email-field' },\n\t\t\tcreateElement('span', { className: classNames?.label }, emailLabel),\n\t\t\tcreateElement('input', {\n\t\t\t\tautoComplete: 'email',\n\t\t\t\tclassName: classNames?.input,\n\t\t\t\tname: 'email',\n\t\t\t\tonChange: (event: { currentTarget: HTMLInputElement }) =>\n\t\t\t\t\tsetEmail(event.currentTarget.value),\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'email',\n\t\t\t\tvalue: email\n\t\t\t})\n\t\t),\n\t\tcreateElement(\n\t\t\t'label',\n\t\t\t{ className: classNames?.field, 'data-abs-auth': 'password-field' },\n\t\t\tcreateElement(\n\t\t\t\t'span',\n\t\t\t\t{ className: classNames?.label },\n\t\t\t\tpasswordLabel\n\t\t\t),\n\t\t\tcreateElement('input', {\n\t\t\t\tautoComplete: 'new-password',\n\t\t\t\tclassName: classNames?.input,\n\t\t\t\tminLength: 12,\n\t\t\t\tname: 'password',\n\t\t\t\tonChange: (event: { currentTarget: HTMLInputElement }) =>\n\t\t\t\t\tsetPassword(event.currentTarget.value),\n\t\t\t\trequired: true,\n\t\t\t\ttype: 'password',\n\t\t\t\tvalue: password\n\t\t\t})\n\t\t),\n\t\terrorBanner,\n\t\tcreateElement(\n\t\t\t'button',\n\t\t\t{\n\t\t\t\tclassName: classNames?.button,\n\t\t\t\t'data-abs-auth': 'submit',\n\t\t\t\tdisabled: isPending,\n\t\t\t\ttype: 'submit'\n\t\t\t},\n\t\t\tisPending ? 'Creating account…' : submitLabel\n\t\t)\n\t);\n};\n",
|
|
24
9
|
"// Drop-in current-user button for React. The component that Clerk's\n// `<UserButton />` was sticky for: shows the signed-in user's email +\n// avatar, expands to a menu on click, exposes sign-out + a\n// customizable list of links.\n//\n// Usage:\n//\n// <UserButton\n// client={authClient}\n// user={user} // your AuthUser-shaped record\n// items={[\n// { label: 'Settings', href: '/settings' },\n// { label: 'API keys', href: '/settings/api' }\n// ]}\n// onSignOut={() => router.push('/')}\n// />\n//\n// The component owns NO data fetching — the consumer passes `user` from\n// wherever they keep session state. Sign-out goes through the package's\n// /oauth2/signout (universal across credential + OAuth sessions since\n// 0.32.0).\nimport { createElement, useState } from 'react';\nimport type { AuthClient } from '../../createAuthClient';\nimport { useSignOut } from '../../react';\n\nexport type UserButtonUser = {\n\tavatarUrl?: string;\n\temail?: string;\n\tgivenName?: string;\n};\n\nexport type UserButtonItem = {\n\thref: string;\n\tlabel: string;\n};\n\nexport type UserButtonProps = {\n\tclient: AuthClient;\n\tclassNames?: {\n\t\tavatar?: string;\n\t\tcontainer?: string;\n\t\temail?: string;\n\t\tmenu?: string;\n\t\tmenuItem?: string;\n\t\tsignOut?: string;\n\t\ttoggle?: string;\n\t};\n\titems?: UserButtonItem[];\n\tonSignOut?: () => void;\n\tsignedOutHref?: string;\n\tsignOutLabel?: string;\n\tuser: UserButtonUser | null;\n};\n\nconst initial = (user: UserButtonUser) => {\n\tconst source = user.givenName ?? user.email ?? '?';\n\n\treturn source.slice(0, 1).toUpperCase();\n};\n\nexport const UserButton = ({\n\tclient,\n\tclassNames,\n\titems,\n\tonSignOut,\n\tsignedOutHref = '/',\n\tsignOutLabel = 'Sign out',\n\tuser\n}: UserButtonProps) => {\n\tconst [open, setOpen] = useState(false);\n\tconst { mutate } = useSignOut(client);\n\n\tif (user === null) {\n\t\treturn createElement(\n\t\t\t'a',\n\t\t\t{\n\t\t\t\tclassName: classNames?.toggle,\n\t\t\t\t'data-abs-auth': 'signed-out',\n\t\t\t\thref: signedOutHref\n\t\t\t},\n\t\t\t'Sign in'\n\t\t);\n\t}\n\n\tconst menu = open\n\t\t? createElement(\n\t\t\t\t'div',\n\t\t\t\t{\n\t\t\t\t\tclassName: classNames?.menu,\n\t\t\t\t\t'data-abs-auth': 'menu'\n\t\t\t\t},\n\t\t\t\t...((items ?? []).map((item) =>\n\t\t\t\t\tcreateElement(\n\t\t\t\t\t\t'a',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tclassName: classNames?.menuItem,\n\t\t\t\t\t\t\t'data-abs-auth-menu-item': item.label,\n\t\t\t\t\t\t\thref: item.href,\n\t\t\t\t\t\t\tkey: item.href\n\t\t\t\t\t\t},\n\t\t\t\t\t\titem.label\n\t\t\t\t\t)\n\t\t\t\t) as ReturnType<typeof createElement>[]),\n\t\t\t\tcreateElement(\n\t\t\t\t\t'button',\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: classNames?.signOut,\n\t\t\t\t\t\t'data-abs-auth': 'sign-out',\n\t\t\t\t\t\tonClick: async () => {\n\t\t\t\t\t\t\tawait mutate(undefined);\n\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\tonSignOut?.();\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: 'button'\n\t\t\t\t\t},\n\t\t\t\t\tsignOutLabel\n\t\t\t\t)\n\t\t\t)\n\t\t: null;\n\n\tconst avatar =\n\t\tuser.avatarUrl === undefined\n\t\t\t? createElement(\n\t\t\t\t\t'span',\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: classNames?.avatar,\n\t\t\t\t\t\t'data-abs-auth': 'avatar-initial'\n\t\t\t\t\t},\n\t\t\t\t\tinitial(user)\n\t\t\t\t)\n\t\t\t: createElement('img', {\n\t\t\t\t\talt: '',\n\t\t\t\t\tclassName: classNames?.avatar,\n\t\t\t\t\t'data-abs-auth': 'avatar',\n\t\t\t\t\tsrc: user.avatarUrl\n\t\t\t\t});\n\n\treturn createElement(\n\t\t'div',\n\t\t{\n\t\t\tclassName: classNames?.container,\n\t\t\t'data-abs-auth': 'user-button',\n\t\t\t'data-abs-auth-open': open ? 'true' : 'false'\n\t\t},\n\t\tcreateElement(\n\t\t\t'button',\n\t\t\t{\n\t\t\t\t'aria-expanded': open,\n\t\t\t\tclassName: classNames?.toggle,\n\t\t\t\t'data-abs-auth': 'user-toggle',\n\t\t\t\tonClick: () => setOpen((prev) => !prev),\n\t\t\t\ttype: 'button'\n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