@neondatabase/auth 0.1.0-beta.11 → 0.1.0-beta.12
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/{adapter-core-C_NEMs0b.mjs → adapter-core-DODfSw9P.mjs} +3 -1
- package/dist/{better-auth-react-adapter-BbM3jLLv.mjs → better-auth-react-adapter-7JyvHiYG.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{neon-auth-DdlToh7_.mjs → neon-auth-Bf2NFptR.mjs} +1 -1
- package/dist/next/index.mjs +2 -2
- package/dist/react/adapters/index.mjs +1 -1
- package/dist/react/index.mjs +1 -1
- package/dist/{supabase-adapter-CAqbpOC7.mjs → supabase-adapter-DdhH8btX.mjs} +1 -1
- package/dist/ui/.safelist.html +1 -1
- package/dist/vanilla/adapters/index.mjs +1 -1
- package/dist/vanilla/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -241,7 +241,8 @@ const BETTER_AUTH_ENDPOINTS = {
|
|
|
241
241
|
signOut: "/sign-out",
|
|
242
242
|
updateUser: "/update-user",
|
|
243
243
|
getSession: "/get-session",
|
|
244
|
-
token: "/token"
|
|
244
|
+
token: "/token",
|
|
245
|
+
anonymousSignIn: "/sign-in/anonymous"
|
|
245
246
|
};
|
|
246
247
|
const BETTER_AUTH_METHODS_HOOKS = {
|
|
247
248
|
signUp: {
|
|
@@ -394,6 +395,7 @@ function isSessionResponseData(responseData) {
|
|
|
394
395
|
return Boolean(responseData && typeof responseData === "object" && "session" in responseData && "user" in responseData && responseData.session !== null && responseData.user !== null);
|
|
395
396
|
}
|
|
396
397
|
function deriveBetterAuthMethodFromUrl(url) {
|
|
398
|
+
if (url.includes("/sign-in/anonymous")) return "anonymousSignIn";
|
|
397
399
|
if (url.includes(BETTER_AUTH_ENDPOINTS.signIn)) return "signIn";
|
|
398
400
|
if (url.includes(BETTER_AUTH_ENDPOINTS.signUp)) return "signUp";
|
|
399
401
|
if (url.includes(BETTER_AUTH_ENDPOINTS.signOut)) return "signOut";
|
package/dist/{better-auth-react-adapter-BbM3jLLv.mjs → better-auth-react-adapter-7JyvHiYG.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NeonAuthAdapterCore } from "./adapter-core-
|
|
1
|
+
import { t as NeonAuthAdapterCore } from "./adapter-core-DODfSw9P.mjs";
|
|
2
2
|
import { createAuthClient } from "better-auth/react";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/better-auth-react/better-auth-react-adapter.ts
|
package/dist/index.mjs
CHANGED
package/dist/next/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-
|
|
2
|
-
import { t as createAuthClient$1 } from "../neon-auth-
|
|
1
|
+
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-7JyvHiYG.mjs";
|
|
2
|
+
import { t as createAuthClient$1 } from "../neon-auth-Bf2NFptR.mjs";
|
|
3
3
|
import { parseCookies, parseSetCookieHeader } from "better-auth/cookies";
|
|
4
4
|
import { NextRequest, NextResponse } from "next/server";
|
|
5
5
|
import { cookies, headers } from "next/headers";
|
package/dist/react/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-
|
|
1
|
+
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-7JyvHiYG.mjs";
|
|
2
2
|
import { c as getViewByPath, n as authLocalization, r as authViewPaths, t as accountViewPaths, u as organizationViewPaths } from "../chunk-5DLVHPZS-Bxj7snpZ-DoVNlsyk.mjs";
|
|
3
3
|
import { $ as RobloxIcon, A as MagicLinkForm, At as useAuthenticate, B as OrganizationSettingsCards, C as GitLabIcon, Ct as UserInvitationsCard, D as KickIcon, Dt as ZoomIcon, E as InputFieldSkeleton, Et as XIcon3, F as OrganizationInvitationsCard, G as PasskeysCard, H as OrganizationSwitcher, I as OrganizationLogo, J as RecoverAccountForm, K as PasswordInput, L as OrganizationLogoCard, M as NeonAuthUIProvider, Mt as useTheme, N as NotionIcon, O as LinearIcon, Ot as socialProviders, P as OrganizationCellView, Q as ResetPasswordForm, R as OrganizationMembersCard, S as GitHubIcon, St as UserButton, T as HuggingFaceIcon, Tt as VKIcon, U as OrganizationView, V as OrganizationSlugCard, W as OrganizationsCard, X as RedirectToSignIn, Y as RedditIcon, Z as RedirectToSignUp, _ as DeleteOrganizationCard, _t as UpdateAvatarCard, a as AppleIcon, at as SignOut, b as FacebookIcon, bt as UpdateUsernameCard, c as AuthLoading, ct as SignedOut, d as AuthView, dt as TeamCell, et as SecuritySettingsCards, f as ChangeEmailCard, ft as TeamsCard, g as DeleteAccountCard, gt as TwoFactorForm, h as CreateTeamDialog, ht as TwoFactorCard, i as AccountsCard, it as SignInForm, j as MicrosoftIcon, jt as useCurrentOrganization, k as LinkedInIcon, kt as useAuthData, l as AuthUIContext, lt as SlackIcon, m as CreateOrganizationDialog, mt as TwitchIcon, n as AccountSettingsCards, nt as SettingsCard, o as AuthCallback, ot as SignUpForm, p as ChangePasswordCard, pt as TikTokIcon, q as ProvidersCard, r as AccountView, rt as SettingsCellSkeleton, s as AuthForm, st as SignedIn, t as AcceptInvitationCard, tt as SessionsCard, u as AuthUIProvider, ut as SpotifyIcon, v as DiscordIcon, vt as UpdateFieldCard, w as GoogleIcon, wt as UserView, x as ForgotPasswordForm, xt as UserAvatar, y as DropboxIcon, yt as UpdateNameCard, z as OrganizationNameCard } from "../ui-aMoA-9nq.mjs";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DEFAULT_SESSION_EXPIRY_MS, i as CURRENT_TAB_CLIENT_ID, n as BETTER_AUTH_METHODS_CACHE, r as BETTER_AUTH_METHODS_HOOKS, t as NeonAuthAdapterCore } from "./adapter-core-
|
|
1
|
+
import { a as DEFAULT_SESSION_EXPIRY_MS, i as CURRENT_TAB_CLIENT_ID, n as BETTER_AUTH_METHODS_CACHE, r as BETTER_AUTH_METHODS_HOOKS, t as NeonAuthAdapterCore } from "./adapter-core-DODfSw9P.mjs";
|
|
2
2
|
import { createAuthClient, getGlobalBroadcastChannel } from "better-auth/client";
|
|
3
3
|
import { AuthApiError, AuthError, isAuthError } from "@supabase/auth-js";
|
|
4
4
|
import { base64url, decodeJwt, decodeProtectedHeader } from "jose";
|
package/dist/ui/.safelist.html
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<!-- Auto-generated safelist for better-auth-ui classes -->
|
|
2
2
|
<!-- This file ensures all necessary utilities are generated -->
|
|
3
|
-
<div class="!bg-transparent !p-2 !py-5 !size-8 !w-auto -mx-1 -my-1 @container/card-header [&_p]:leading-relaxed [&_svg:not([class*= [&_svg]:pointer-events-none [&_svg]:shrink-0 [.border-b]:pb-6 [.border-t]:pt-6 absolute action-button animate-caret-blink animate-pulse animate-spin aria-invalid:border-destructive aria-invalid:ring-destructive/20 aspect-square auto-rows-min bg-accent bg-background bg-black/50 bg-border bg-card bg-foreground bg-muted bg-popover bg-transparent border border-color border-input border-r border-solid border-transparent border-y break-all col-start-2 cursor-default dark:aria-invalid:ring-destructive/40 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 dark:data-[state=active]:bg-input/30 dark:data-[state=active]:border-input dark:data-[state=active]:text-foreground dark:data-[state=checked]:bg-primary dark:data-[variant=destructive]:focus:bg-destructive/20 dark:text-muted-foreground data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:z-10 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[error=true]:text-destructive data-[inset]:pl-8 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px data-[placeholder]:text-muted-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=active]:bg-background data-[state=active]:shadow-sm data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:bg-accent data-[state=open]:fade-in-0 data-[state=open]:text-accent-foreground data-[state=open]:text-muted-foreground data-[state=open]:zoom-in-95 data-[variant=destructive]:*:[svg]:!text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:text-destructive disabled:cursor-not-allowed disabled:opacity-50 disabled:pointer-events-none duration-1000 duration-200 field-sizing-content file:bg-transparent file:border-0 file:font-medium file:h-7 file:inline-flex file:text-foreground file:text-sm fill-current first:border-l first:rounded-l-md fixed flex flex-1 flex-col flex-col-reverse flex-row flex-shrink-0 focus-visible:border-ring focus-visible:outline-1 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus:bg-accent focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-ring focus:text-accent-foreground font-bold font-medium font-mono font-sans font-semibold gap-0.5 gap-1 gap-1.5 gap-2 gap-3 gap-4 gap-6 grid grid-cols-2 grid-rows-[auto_auto] group-data-[disabled=true]:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[vaul-drawer-direction=bottom]/drawer-content:block group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center group/drawer-content grow h-2 h-3 h-4 h-5 h-8 h-9 h-[calc(100%-1px)] h-auto h-fit h-px has-data-[slot=card-action]:grid-cols-[1fr_auto] has-disabled:opacity-50 hidden hover:opacity-100 hover:underline inline-flex inset-0 items-center items-start justify-between justify-center justify-items-center justify-items-start justify-self-end justify-start last:rounded-r-md leading-[24px] leading-none leading-tight left-2 left-[50%] lg:w-60 line-clamp-1 max-h-(--radix-dropdown-menu-content-available-height) max-h-(--radix-select-content-available-height) max-w-14 max-w-32 max-w-56 max-w-64 max-w-[465px] max-w-[calc(100%-2rem)] max-w-full max-w-sm mb-0.5 mb-[32px] md:block md:flex-row md:gap-1.5 md:gap-12 md:gap-6 md:h-3.5 md:h-4 md:h-5.5 md:hidden md:ms-auto md:text-left md:text-sm md:text-start md:text-xl md:w-40 md:w-56 md:w-64 me-6 min-h-16 min-h-4 min-w-0 min-w-56 min-w-[8rem] ml-1 ml-auto ms-auto mt-0.5 mt-1.5 mt-4 mt-[32px] mt-auto mx-0 mx-auto my-0 my-0.5 my-1 my-2 my-[26px] my-[30px] my-[40px] my-auto no-underline opacity-50 opacity-70 origin-(--radix-dropdown-menu-content-transform-origin) origin-(--radix-select-content-transform-origin) outline-hidden outline-none overflow-hidden overflow-x-hidden overflow-y-auto p-0 p-1 p-2 p-4 p-6 p-[20px] p-[3px] pb-0 pb-4 peer peer-disabled:cursor-not-allowed peer-disabled:opacity-50 pl-8 placeholder:text-muted-foreground pointer-events-none pr-2 px-0 px-2 px-3 px-4 px-5 px-6 py-1 py-1.5 py-2 py-3 py-4 py-6 relative right-0 right-2 right-4 ring-offset-background rounded rounded-[4px] rounded-b-xl rounded-full rounded-lg rounded-md rounded-sm rounded-xl rounded-xs row-span-2 row-start-1 select-none selection:bg-primary selection:text-primary-foreground self-center self-start shadow-lg shadow-md shadow-sm shadow-xs shrink-0 shrink-2 size-10 size-16 size-2 size-20 size-3 size-3.5 size-4 size-5 size-8 size-[50%] size-fit size-full sm:flex-row sm:justify-end sm:max-w-lg sm:max-w-md sm:text-left space-y-3 space-y-6 sr-only st0 st1 text-2xl text-[#666666] text-[12px] text-[14px] text-[24px] text-base text-card-foreground text-center text-current text-destructive text-foreground text-left text-lg text-muted-foreground text-popover-foreground text-sm text-start text-xs top-0 top-4 top-[50%] tracking-tight tracking-widest transition-[color,box-shadow] transition-all transition-none transition-opacity transition-shadow translate-x-[-50%] translate-y-[-50%] truncate underline uppercase w-1/3 w-12 w-14 w-2/3 w-24 w-28 w-32 w-48 w-9 w-[--radix-dropdown-menu-trigger-width] w-[--radix-select-trigger-width] w-[100px] w-fit w-full w-px whitespace-nowrap z-50"></div>
|
|
3
|
+
<div class="!bg-transparent !p-2 !py-5 !size-8 !w-auto *:[span]:last:flex *:[span]:last:gap-2 *:[span]:last:items-center *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:items-center *:data-[slot=select-value]:line-clamp-1 -mx-1 -my-1 @container/card-header [&_p]:leading-relaxed [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [.border-b]:pb-6 [.border-t]:pt-6 absolute action-button animate-caret-blink animate-pulse animate-spin aria-invalid:border-destructive aria-invalid:ring-destructive/20 aspect-square auto-rows-min bg-accent bg-background bg-black/50 bg-border bg-card bg-foreground bg-muted bg-popover bg-transparent border border-color border-input border-r border-solid border-transparent border-y break-all col-start-2 cursor-default dark:aria-invalid:ring-destructive/40 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 dark:data-[state=active]:bg-input/30 dark:data-[state=active]:border-input dark:data-[state=active]:text-foreground dark:data-[state=checked]:bg-primary dark:data-[variant=destructive]:focus:bg-destructive/20 dark:hover:bg-input/50 dark:text-muted-foreground data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:z-10 data-[disabled]:opacity-50 data-[disabled]:pointer-events-none data-[error=true]:text-destructive data-[inset]:pl-8 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px data-[placeholder]:text-muted-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[size=default]:h-9 data-[size=sm]:h-8 data-[state=active]:bg-background data-[state=active]:shadow-sm data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:bg-accent data-[state=open]:fade-in-0 data-[state=open]:text-accent-foreground data-[state=open]:text-muted-foreground data-[state=open]:zoom-in-95 data-[variant=destructive]:*:[svg]:!text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:text-destructive disabled:cursor-not-allowed disabled:opacity-50 disabled:pointer-events-none duration-1000 duration-200 field-sizing-content file:bg-transparent file:border-0 file:font-medium file:h-7 file:inline-flex file:text-foreground file:text-sm fill-current first:border-l first:rounded-l-md fixed flex flex-1 flex-col flex-col-reverse flex-row flex-shrink-0 focus-visible:border-ring focus-visible:outline-1 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus:bg-accent focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-ring focus:text-accent-foreground font-bold font-medium font-mono font-sans font-semibold gap-0.5 gap-1 gap-1.5 gap-2 gap-3 gap-4 gap-6 grid grid-cols-2 grid-rows-[auto_auto] group-data-[disabled=true]:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[vaul-drawer-direction=bottom]/drawer-content:block group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center group/drawer-content grow h-2 h-3 h-4 h-5 h-8 h-9 h-[calc(100%-1px)] h-auto h-fit h-px has-data-[slot=card-action]:grid-cols-[1fr_auto] has-disabled:opacity-50 hidden hover:opacity-100 hover:underline inline-flex inset-0 items-center items-start justify-between justify-center justify-items-center justify-items-start justify-self-end justify-start last:rounded-r-md leading-[24px] leading-none leading-tight left-2 left-[50%] lg:w-60 line-clamp-1 max-h-(--radix-dropdown-menu-content-available-height) max-h-(--radix-select-content-available-height) max-w-14 max-w-32 max-w-56 max-w-64 max-w-[465px] max-w-[calc(100%-2rem)] max-w-full max-w-sm mb-0.5 mb-[32px] md:block md:flex-row md:gap-1.5 md:gap-12 md:gap-6 md:h-3.5 md:h-4 md:h-5.5 md:hidden md:ms-auto md:text-left md:text-sm md:text-start md:text-xl md:w-40 md:w-56 md:w-64 me-6 min-h-16 min-h-4 min-w-0 min-w-56 min-w-[8rem] ml-1 ml-auto ms-auto mt-0.5 mt-1.5 mt-4 mt-[32px] mt-auto mx-0 mx-auto my-0 my-0.5 my-1 my-2 my-[26px] my-[30px] my-[40px] my-auto no-underline opacity-50 opacity-70 origin-(--radix-dropdown-menu-content-transform-origin) origin-(--radix-select-content-transform-origin) outline-hidden outline-none overflow-hidden overflow-x-hidden overflow-y-auto p-0 p-1 p-2 p-4 p-6 p-[20px] p-[3px] pb-0 pb-4 peer peer-disabled:cursor-not-allowed peer-disabled:opacity-50 pl-2 pl-8 placeholder:text-muted-foreground pointer-events-none pr-2 pr-8 px-0 px-2 px-3 px-4 px-5 px-6 py-1 py-1.5 py-2 py-3 py-4 py-6 relative right-0 right-2 right-4 ring-offset-background rounded rounded-[4px] rounded-b-xl rounded-full rounded-lg rounded-md rounded-sm rounded-xl rounded-xs row-span-2 row-start-1 select-none selection:bg-primary selection:text-primary-foreground self-center self-start shadow-lg shadow-md shadow-sm shadow-xs shrink-0 shrink-2 size-10 size-16 size-2 size-20 size-3 size-3.5 size-4 size-5 size-8 size-[50%] size-fit size-full sm:flex-row sm:justify-end sm:max-w-lg sm:max-w-md sm:text-left space-y-3 space-y-6 sr-only st0 st1 text-2xl text-[#666666] text-[12px] text-[14px] text-[24px] text-base text-card-foreground text-center text-current text-destructive text-foreground text-left text-lg text-muted-foreground text-popover-foreground text-sm text-start text-xs top-0 top-4 top-[50%] tracking-tight tracking-widest transition-[color,box-shadow] transition-all transition-none transition-opacity transition-shadow translate-x-[-50%] translate-y-[-50%] truncate underline uppercase w-1/3 w-12 w-14 w-2/3 w-24 w-28 w-32 w-48 w-9 w-[--radix-dropdown-menu-trigger-width] w-[--radix-select-trigger-width] w-[100px] w-fit w-full w-px whitespace-nowrap z-50"></div>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as BetterAuthVanillaAdapter, t as SupabaseAuthAdapter } from "../../supabase-adapter-
|
|
1
|
+
import { n as BetterAuthVanillaAdapter, t as SupabaseAuthAdapter } from "../../supabase-adapter-DdhH8btX.mjs";
|
|
2
2
|
|
|
3
3
|
export { BetterAuthVanillaAdapter, SupabaseAuthAdapter };
|
package/dist/vanilla/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as BetterAuthVanillaAdapter, t as SupabaseAuthAdapter } from "../supabase-adapter-
|
|
1
|
+
import { n as BetterAuthVanillaAdapter, t as SupabaseAuthAdapter } from "../supabase-adapter-DdhH8btX.mjs";
|
|
2
2
|
|
|
3
3
|
export { BetterAuthVanillaAdapter, SupabaseAuthAdapter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neondatabase/auth",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.12",
|
|
4
4
|
"description": "TypeScript SDK for Neon Auth - authentication for PostgreSQL with multiple adapter support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"better-auth": "1.4.6",
|
|
107
107
|
"zod": "4.1.12",
|
|
108
108
|
"jose": "6.1.2",
|
|
109
|
-
"@neondatabase/auth-ui": "0.1.0-alpha.
|
|
109
|
+
"@neondatabase/auth-ui": "0.1.0-alpha.9"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
112
|
"react": ">=18.0.0",
|