@xk2800/nextjs-template 0.7.1-beta.13 → 0.7.1-beta.15
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/components/auth/oneTap.tsx +9 -1
- package/components/ui/alert-dialog.tsx +1 -1
- package/components/ui/avatar.tsx +1 -1
- package/components/ui/badge.tsx +2 -2
- package/components/ui/dialog.tsx +1 -1
- package/components/ui/dropdown-menu.tsx +1 -1
- package/components/ui/label.tsx +1 -1
- package/dist/api/feedback.js +498 -63
- package/dist/api/feedback.js.map +1 -1
- package/dist/api/feedback.mjs +1 -1
- package/dist/api/marketing.js +498 -63
- package/dist/api/marketing.js.map +1 -1
- package/dist/api/marketing.mjs +2 -2
- package/dist/auth/helpers.d.mts +3 -3
- package/dist/auth/helpers.d.ts +3 -3
- package/dist/auth/helpers.js +496 -61
- package/dist/auth/helpers.js.map +1 -1
- package/dist/auth/helpers.mjs +2 -2
- package/dist/auth/index.d.mts +142 -10
- package/dist/auth/index.d.ts +142 -10
- package/dist/auth/index.js +496 -61
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/index.mjs +1 -1
- package/dist/auth-client/index.d.mts +16 -16
- package/dist/auth-client/index.d.ts +16 -16
- package/dist/{chunk-6Z3WUSDJ.mjs → chunk-A2K3FVDH.mjs} +3 -3
- package/dist/{chunk-6Z3WUSDJ.mjs.map → chunk-A2K3FVDH.mjs.map} +1 -1
- package/dist/chunk-WJMWCE2I.mjs +897 -0
- package/dist/chunk-WJMWCE2I.mjs.map +1 -0
- package/package.json +2 -16
- package/dist/chunk-7QVIOQ47.mjs +0 -462
- package/dist/chunk-7QVIOQ47.mjs.map +0 -1
|
@@ -41,8 +41,16 @@ const OneTap = ({ callbackURL = '/dashboard' }: OneTapProps) => {
|
|
|
41
41
|
if (oneTapOffered !== true) return
|
|
42
42
|
if (!oneTapAllowed) return
|
|
43
43
|
|
|
44
|
+
// Passing fetchOptions (and no callbackURL) turns off the client's own redirect, so
|
|
45
|
+
// a 2FA challenge ({ twoFactorRedirect }) isn't overwritten by a jump to callbackURL.
|
|
44
46
|
authClient.oneTap({
|
|
45
|
-
|
|
47
|
+
fetchOptions: {
|
|
48
|
+
onSuccess: ({ data }) => {
|
|
49
|
+
window.location.href = (data as { twoFactorRedirect?: boolean } | null)?.twoFactorRedirect
|
|
50
|
+
? `/login/2fa?callbackUrl=${encodeURIComponent(callbackURL)}`
|
|
51
|
+
: callbackURL
|
|
52
|
+
},
|
|
53
|
+
},
|
|
46
54
|
onPromptNotification: (notification) => {
|
|
47
55
|
console.log('One Tap prompt notification:', notification)
|
|
48
56
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import
|
|
4
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui"
|
|
5
5
|
import { cn } from "../../lib/utils"
|
|
6
6
|
import { buttonVariants } from "./button"
|
|
7
7
|
|
package/components/ui/avatar.tsx
CHANGED
package/components/ui/badge.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
|
-
import { Slot } from "
|
|
2
|
+
import { Slot } from "radix-ui"
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
4
|
|
|
5
5
|
import { cn } from "../../lib/utils"
|
|
@@ -34,7 +34,7 @@ function Badge({
|
|
|
34
34
|
...props
|
|
35
35
|
}: React.ComponentProps<"span"> &
|
|
36
36
|
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
37
|
-
const Comp = asChild ? Slot : "span"
|
|
37
|
+
const Comp = asChild ? Slot.Root : "span"
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<Comp
|
package/components/ui/dialog.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import
|
|
4
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
|
5
5
|
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
6
6
|
|
|
7
7
|
import { cn } from "../../lib/utils"
|
package/components/ui/label.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import
|
|
4
|
+
import { Label as LabelPrimitive } from "radix-ui"
|
|
5
5
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
6
|
|
|
7
7
|
import { cn } from "../../lib/utils"
|