@xk2800/nextjs-template 0.7.1-beta.14 → 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/dist/activity/queries.d.mts +1 -1
- package/dist/activity/queries.d.ts +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.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/{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/dist/db/index.d.mts +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/schema.d.mts +1 -1
- package/dist/db/schema.d.ts +1 -1
- package/dist/{schema-CN_Y6EXv.d.mts → schema-lgO4CzE4.d.mts} +1 -1
- package/dist/{schema-CN_Y6EXv.d.ts → schema-lgO4CzE4.d.ts} +1 -1
- package/dist/settings/queries.d.mts +1 -1
- package/dist/settings/queries.d.ts +1 -1
- package/package.json +2 -2
- 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
|
}
|