Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

autocomplete passkey, if exists

Amruth Pillai7df9b1e4b549
diff --git a/package.json b/package.json
index 9b9d9efdd..40e19cb1a 100644
--- a/package.json
+++ b/package.json
@@ -41,11 +41,11 @@
"@ai-sdk/openai": "^3.0.52",
"@aws-sdk/client-s3": "^3.1030.0",
"@base-ui/react": "^1.4.0",
- "@better-auth/api-key": "^1.6.2",
- "@better-auth/drizzle-adapter": "^1.6.2",
+ "@better-auth/api-key": "^1.6.3",
+ "@better-auth/drizzle-adapter": "^1.6.3",
"@better-auth/infra": "^0.2.2",
- "@better-auth/oauth-provider": "^1.6.2",
- "@better-auth/passkey": "^1.6.2",
+ "@better-auth/oauth-provider": "^1.6.3",
+ "@better-auth/passkey": "^1.6.3",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
@@ -81,7 +81,7 @@
"ai": "^6.0.159",
"ai-sdk-ollama": "^3.8.3",
"bcrypt": "^6.0.0",
- "better-auth": "^1.6.2",
+ "better-auth": "^1.6.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1c9f8a773..3adfb6048 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -38,20 +38,20 @@ importers:
specifier: ^1.4.0
'@better-auth/api-key':
- specifier: ^1.6.2
- version: 1.6.2(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](f7c164aa6230c44ac25e89d2c095dfd8))
+ specifier: ^1.6.3
+ version: 1.6.3(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])([email protected](f7c164aa6230c44ac25e89d2c095dfd8))
'@better-auth/drizzle-adapter':
- specifier: ^1.6.2
+ specifier: ^1.6.3
'@better-auth/infra':
specifier: ^0.2.2
'@better-auth/oauth-provider':
- specifier: ^1.6.2
+ specifier: ^1.6.3
'@better-auth/passkey':
- specifier: ^1.6.2
+ specifier: ^1.6.3
'@dnd-kit/core':
specifier: ^6.3.1
@@ -158,8 +158,8 @@ importers:
specifier: ^6.0.0
version: 6.0.0
better-auth:
- specifier: ^1.6.2
- version: 1.6.2(f7c164aa6230c44ac25e89d2c095dfd8)
+ specifier: ^1.6.3
+ version: 1.6.3(f7c164aa6230c44ac25e89d2c095dfd8)
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
@@ -1215,15 +1215,15 @@ packages:
resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==}
engines: {node: '>=18'}
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-eEGfiPKS4qnd8MoV+GtPM9PP74cNfvQow3/0jARRNu8piI8R4NjqpojaSJVjZa5VrsRDKyYCpXAKz8u+7eaHog==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-QucqL4i1fDAqajnS2G+X1fOBF/pB7DQlZZNnKpUYhNSzM583+0Gjovq8cwSZl6zt/5nR7c1DmN+PyfEdJBc0YA==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
- better-auth: ^1.6.2
+ better-auth: ^1.6.3
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-nBftDp+eN1fwXor1O4KQorCXa0tJNDgpab7O1z4NcWUU+3faDpdzqLn5mbXZer2E8ZD4VhjqOfYZ041xnBF5NA==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-HefGR2SNfAi2RhT6XvSYViH4a0xoCGGL10bSDiv6sQGrmY6ulEQEV1X4nebTHeG0P6jdBmXAoEW3k37nhpk99w==}
peerDependencies:
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
@@ -1237,10 +1237,10 @@ packages:
'@cloudflare/workers-types':
optional: true
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-KawrNNuhgmpcc5PgLs6HesMckxCscz5J+BQ99iRmU1cLzG/A87IcydrmYtep+K8WHPN0HmZ/i4z/nOBCtxE2qA==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-P5erUYKoctOnOf+hd3umkOhOqJA+WuDByzmgnxZMBQLhgmusn5cgW10449B9aZu8HxIcU/tUQo/8ucwXHNzZ0A==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
drizzle-orm: '>=0.41.0'
peerDependenciesMeta:
@@ -1269,55 +1269,55 @@ packages:
expo-device:
optional: true
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-YMMm75jek/MNCAFWTAaq/U3VPmFnrwZW4NhBjjAwruHQJEIrSZZaOaUEXuUpFRRBhWqg7OOltQcHMwU/45CkuA==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-4iZLGaajEdPMgtiTARINbNZGl6CPHSzlS0fl4ONWryP/52iakYhXYNBJIB70Ls1Xl+kEqYkBFmndfj/x4j18RQ==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
kysely: ^0.27.0 || ^0.28.0
peerDependenciesMeta:
kysely:
optional: true
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-QvuK5m7NFgkzLPHyab+NORu3J683nj36Tix58qq6DPcniyY6KZk5gY2yyh4+z1wgSjrxwY5NFx/DC2qz8B8NJg==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-0HCogGjUqVBl5j+7pkoovyIIAcCKsy8wiebDbTnedD99bCXQ+BhBAf8KQG1wMx6Nnc8fFwDuhSBhvTmCrdlmMQ==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-IvR2Q+1pjzxA4JXI3ED76+6fsqervIpZ2K5MxoX/+miLQhLEmNcbqqcItg4O2kfkxN8h33/ev57sjTW8QH9Tuw==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-xer3hjuYaqcx/qMdZMXTUQz4ROLeS14Knas6OSY2gK8jgAidZO7twcb+wLgTbtJYmoXZqKFzSxoWuf6LxVvZCw==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
mongodb: ^6.0.0 || ^7.0.0
peerDependenciesMeta:
mongodb:
optional: true
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-kiPtXNIQJnn0LYfjftPslj/1HuyVlrwG7htRCJG5hD6qfiCfjsNsAkvLc4WZVKfZpXkSxFOiQYNpBKmK89/TOA==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-O3yEZ5ZYPIzkoXcNPp4iQkhvk7MS5sxfiY/IHIAEu9GDhiq1O5L0A0FMvDoHN2tXIJyGPzcNMM3PQSUsry9pWA==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
- better-auth: ^1.6.2
+ better-auth: ^1.6.3
better-call: 1.3.5
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-jMfLAoCS+hI3nCZw3CepWIW/hAvw5l7CoN4PzhaSOt16uuAKHXbZPJOT7pz+E4l2d20+L7eshN4pH9wBh2L+uA==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-NWrpngjSRsJ67ifFeNehRgvhJ5dS/EEV4n1zAO/VdQ7oE2Uk8eJIMXt/fYb7JO/c2gZfLjXy8DolLh7dIEJ9bQ==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
- better-auth: ^1.6.2
+ better-auth: ^1.6.3
better-call: 1.3.5
nanostores: ^1.0.1
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-bQkXYTo1zPau+xAiMpo1yCjEDSy7i7oeYlkYO+fSfRDCo52DE/9oPOOuI+EStmFkPUNSk9L2rhk8Fulifi8WCg==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-vrlGEdrpzNH+S0AjnQt6T9jeIxqYDNRwq/1lOQ50wS5OAzSjtZQ+Q/UCrBTF8ZBrYzQq28zIAuk6k2+xhqxZpQ==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
'@prisma/client': ^5.0.0 || ^6.0.0 || ^7.0.0
prisma: ^5.0.0 || ^6.0.0 || ^7.0.0
@@ -1335,10 +1335,10 @@ packages:
better-auth: 1.5.5
better-call: 1.3.2
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-o4gHKXqizUxVUUYChZZTowLEzdsz3ViBE/fKFzfHqNFUnF+aVt8QsbLSfipq1WpTIXyJVT/SnH0hgSdWxdssbQ==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-Kw2LFnxBt36KF0Cfw46qcOaNtuqgr6kjJPDHKHCx3b7tbiSAEeEhZCc7wvWYbZPXkgI58IGi+bMrgnWjFCG1Zw==}
peerDependencies:
- '@better-auth/core': ^1.6.2
+ '@better-auth/core': ^1.6.3
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
@@ -4670,8 +4670,8 @@ packages:
resolution: {integrity: sha512-cU8v/EGSrnH+HnxV2z0J7/blxH8gq7Xh2JFT6Aroax7UohdmiJJlxApMxtKfuI7z68NvvVcmR78k2LbT6efhRg==}
engines: {node: '>= 18'}
- resolution: {integrity: sha512-5nqDAIj5xexmnk+GjjdrBknJCabi1mlvsVWJbxs4usHreao4vNdxIxINWDzCyDF9iDR1ildRZdXWSiYPAvTHhA==}
+ resolution: {integrity: sha512-jMsoSYQyO8nNRuLEoCP+OUShLyeIGU8ioPYqra0IteLjnS3WNjHj21YE/COSJ/V/f0H5SInZiF+uXcEEHREDMQ==}
peerDependencies:
'@lynx-js/react': '*'
'@prisma/client': ^5.0.0 || ^6.0.0 || ^7.0.0
@@ -10210,14 +10210,14 @@ snapshots:
'@bcoe/[email protected]': {}
dependencies:
'@better-auth/utils': 0.4.0
- better-auth: 1.6.2(f7c164aa6230c44ac25e89d2c095dfd8)
+ better-auth: 1.6.3(f7c164aa6230c44ac25e89d2c095dfd8)
zod: 4.3.6
dependencies:
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
@@ -10230,80 +10230,80 @@ snapshots:
nanostores: 1.2.0
zod: 4.3.6
dependencies:
'@better-auth/utils': 0.4.0
optionalDependencies:
dependencies:
'@better-fetch/fetch': 1.1.21
- better-auth: 1.6.2(f7c164aa6230c44ac25e89d2c095dfd8)
+ better-auth: 1.6.3(f7c164aa6230c44ac25e89d2c095dfd8)
better-call: 1.3.5([email protected])
jose: 6.2.2
libphonenumber-js: 1.12.41
react-native: 0.85.0(@babel/[email protected])(@types/[email protected])([email protected])
zod: 4.3.6
dependencies:
'@better-auth/utils': 0.4.0
optionalDependencies:
kysely: 0.28.16
dependencies:
'@better-auth/utils': 0.4.0
dependencies:
'@better-auth/utils': 0.4.0
optionalDependencies:
mongodb: 7.1.0([email protected])
dependencies:
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
- better-auth: 1.6.2(f7c164aa6230c44ac25e89d2c095dfd8)
+ better-auth: 1.6.3(f7c164aa6230c44ac25e89d2c095dfd8)
better-call: 1.3.5([email protected])
jose: 6.2.2
zod: 4.3.6
dependencies:
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
'@simplewebauthn/browser': 13.3.0
'@simplewebauthn/server': 13.3.0
- better-auth: 1.6.2(f7c164aa6230c44ac25e89d2c095dfd8)
+ better-auth: 1.6.3(f7c164aa6230c44ac25e89d2c095dfd8)
better-call: 1.3.5([email protected])
nanostores: 1.2.0
zod: 4.3.6
dependencies:
'@better-auth/utils': 0.4.0
optionalDependencies:
dependencies:
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
- better-auth: 1.6.2(f7c164aa6230c44ac25e89d2c095dfd8)
+ better-auth: 1.6.3(f7c164aa6230c44ac25e89d2c095dfd8)
better-call: 1.3.5([email protected])
fast-xml-parser: 5.5.12
jose: 6.2.2
@@ -10311,9 +10311,9 @@ snapshots:
tldts: 6.1.86
zod: 4.3.6
dependencies:
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
@@ -13513,15 +13513,15 @@ snapshots:
node-addon-api: 8.7.0
node-gyp-build: 4.8.4
- [email protected](f7c164aa6230c44ac25e89d2c095dfd8):
+ [email protected](f7c164aa6230c44ac25e89d2c095dfd8):
dependencies:
- '@better-auth/memory-adapter': 1.6.2(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])
- '@better-auth/telemetry': 1.6.2(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@better-fetch/[email protected])
+ '@better-auth/memory-adapter': 1.6.3(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])
+ '@better-auth/telemetry': 1.6.3(@better-auth/[email protected](@better-auth/[email protected])(@better-fetch/[email protected])(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]))(@better-auth/[email protected])(@better-fetch/[email protected])
'@better-auth/utils': 0.4.0
'@better-fetch/fetch': 1.1.21
'@noble/ciphers': 2.2.0
diff --git a/src/routes/auth/-components/social-auth.tsx b/src/routes/auth/-components/social-auth.tsx
index 711d81bf2..983678489 100644
--- a/src/routes/auth/-components/social-auth.tsx
+++ b/src/routes/auth/-components/social-auth.tsx
@@ -3,7 +3,7 @@ import { Trans } from "@lingui/react/macro";
import { FingerprintIcon, GithubLogoIcon, GoogleLogoIcon, LinkedinLogoIcon, VaultIcon } from "@phosphor-icons/react";
import { useQuery } from "@tanstack/react-query";
import { useRouter } from "@tanstack/react-router";
-import { useEffect } from "react";
+import { useEffect, useRef } from "react";
import { toast } from "sonner";
import type { RouterOutput } from "@/integrations/orpc/client";
@@ -51,6 +51,7 @@ type SocialAuthButtonsProps = {
function SocialAuthButtons({ providers }: SocialAuthButtonsProps) {
const router = useRouter();
+ const hasStartedConditionalPasskeyRef = useRef(false);
const handleSocialLogin = async (provider: string) => {
const toastId = toast.loading(t`Signing in...`);
@@ -101,15 +102,23 @@ function SocialAuthButtons({ providers }: SocialAuthButtonsProps) {
};
useEffect(() => {
+ if (!("passkey" in providers)) return;
if (typeof window === "undefined") return;
if (!("PublicKeyCredential" in window)) return;
if (!PublicKeyCredential.isConditionalMediationAvailable) return;
+ if (hasStartedConditionalPasskeyRef.current) return;
- void PublicKeyCredential.isConditionalMediationAvailable().then((isAvailable) => {
+ hasStartedConditionalPasskeyRef.current = true;
+
+ void PublicKeyCredential.isConditionalMediationAvailable().then(async (isAvailable) => {
if (!isAvailable) return;
- void authClient.signIn.passkey({ autoFill: true });
+
+ const { error } = await authClient.signIn.passkey({ autoFill: true });
+ if (error) return;
+
+ await router.invalidate();
});
- }, []);
+ }, [providers, router]);
return (
<div className="grid grid-cols-2 gap-4">
diff --git a/src/routes/auth/login.tsx b/src/routes/auth/login.tsx
index fbe2cfa04..04dbcc60f 100644
--- a/src/routes/auth/login.tsx
+++ b/src/routes/auth/login.tsx
@@ -121,7 +121,8 @@ function RouteComponent() {
<FormControl
render={
<Input
- autoComplete="section-login username"
+ autoFocus
+ autoComplete="section-login username webauthn"
placeholder="[email protected]"
className="lowercase"
{...field}