exkazuu
09/18/2023, 4:30 AMapp/(superTokens)/layout.tsx
which includes 'use client'
.
How can I configure setHref
handler in frontendConfig()
without `next/router`'s Router.push()
which causes an error?
In addition, <SuperTokensComponentNoSSR />
doesn't show anything.nkshah2
09/18/2023, 6:48 AMporcellus
09/18/2023, 9:30 AMporcellus
09/18/2023, 9:31 AMsetHref
in the configuration, the drawback being that SuperTokens will be using full-page navigation (the next.js docs call it hard navigation). We are only doing this when navigating between auth pages (e.g.: from the email password sign in screen to the reset password screen or to the email verification screen) and when redirecting to the auth page (the user visits a protected page with an expired session)porcellus
09/18/2023, 9:32 AMSuperTokensComponentNoSSR
? are there any errors in the console? Where/how is it embedded (it may be easier just to show the entire page where it is defined/used)?exkazuu
09/20/2023, 2:31 AMApp Router
is different from Page Router
(cf. https://nextjs.org/docs/app/building-your-application/routing/route-handlers).
I've put the API file on app/api/auth/[[...path]].ts
(cf. https://supertokens.com/docs/emailpassword/nextjs/setting-up-backend#2-expose-the-supertokens-apis), then it does not work.
Could you help me write the API file for SuperTokens in app
directory?exkazuu
09/20/2023, 2:34 AMX Detected default export in '/Users/exkazuu/ghq/github.com/exKAZUu/supertokens-nextjs-app-router-example/src/app/api/auth/[[...path]]/route.ts'. Export a named export for each HTTP method instead.
X No HTTP methods exported in '/Users/exkazuu/ghq/github.com/exKAZUu/supertokens-nextjs-app-router-example/src/app/api/auth/[[...path]]/route.ts'. Export a named export for each HTTP method.
porcellus
09/20/2023, 8:16 AMexkazuu
09/20/2023, 8:58 AMporcellus
09/20/2023, 11:01 AMexkazuu
09/21/2023, 1:09 AMexkazuu
09/24/2023, 6:04 AMnext/with-emailpassword
. I've created the issue with the reproduction steps. Could you check it?
https://github.com/supertokens/supertokens-node/issues/699SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by