mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 04:19:20 +00:00
fix: passkey failing on localhost other than 3000 (#103)
This commit is contained in:
@@ -18,6 +18,7 @@ import { Checkbox } from "~/components/ui/checkbox";
|
||||
import { Input } from "~/components/ui/input";
|
||||
import { Label } from "~/components/ui/label";
|
||||
import { signIn } from "~/lib/auth-client";
|
||||
import { PasswordInput } from "./ui/password-input";
|
||||
|
||||
export default function SignInCard() {
|
||||
const [email, setEmail] = useState("");
|
||||
@@ -58,13 +59,13 @@ export default function SignInCard() {
|
||||
Forgot your password?
|
||||
</Link>
|
||||
</div>
|
||||
{/* <PasswordInput
|
||||
<PasswordInput
|
||||
id="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
autoComplete="password"
|
||||
placeholder="Password"
|
||||
/> */}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Checkbox
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"extends": "./.svelte-kit/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "better-auth",
|
||||
"version": "0.3.3-beta.5",
|
||||
"version": "0.3.3-beta.7",
|
||||
"description": "The most comprehensive authentication library for TypeScript.",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -76,10 +76,7 @@ export const passkey = (options?: PasskeyOptions) => {
|
||||
const baseURL = process.env.BETTER_AUTH_URL;
|
||||
const rpID =
|
||||
options?.rpID ||
|
||||
baseURL
|
||||
?.replace("http://", "")
|
||||
.replace("https://", "")
|
||||
.replace(":3000", "") ||
|
||||
baseURL?.replace("http://", "").replace("https://", "").split(":")[0] ||
|
||||
"localhost";
|
||||
if (!rpID) {
|
||||
throw new BetterAuthError(
|
||||
|
||||
Reference in New Issue
Block a user