Hi guys, I am trying to integrate Supertokens with Next.js 13, and am using
supertokens-web-js
. In the example I see you guys are using:
import SuperTokensReact, { SuperTokensWrapper } from 'supertokens-auth-react'
so the" SuperTokensWrapper" from the
supertokens-auth-react
package.
Is there an equivalent in the
supertokens-web-js
package so that I can wrap my pages from the app router?
r
rp_st
09/16/2023, 3:56 PM
Hey. There isn’t. But, you can use supertokens-auth-react and not use our pre built UI. And then it would be the same thing as using web-js, but you would have that wrapper.
r
robschilder
09/16/2023, 3:57 PM
Can I use them both at the same time?
r
rp_st
09/16/2023, 3:57 PM
Yea
rp_st
09/16/2023, 3:57 PM
The auth-react package depends on web-js anyway
r
robschilder
09/16/2023, 3:58 PM
Cool! trying to implement pages/app router both on nextjs 13 now for a new project, might ask some more questions if needed
robschilder
09/16/2023, 4:24 PM
hmm I see that when importing this from auth-react:
rgument of type '{ thirdPartyId: "google" | "apple" | "github"; authorisationURL: string; }' is not assignable to parameter of type '{ thirdPartyId: string; frontendRedirectURI: string; redirectURIOnProviderDashboard?: string | undefined; userContext?: any; options?: RecipeFunctionOptions | undefined; }'.
Object literal may only specify known properties, and 'authorisationURL' does not exist in type '{ thirdPartyId: string; frontendRedirectURI: string; redirectURIOnProviderDashboard?: string | undefined; userContext?: any; options?: RecipeFunctionOptions | undefined; }'.ts
robschilder
09/16/2023, 4:26 PM
nevermind, i see many differences, will not migrate to app router yet
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).