diff --git a/packages/user/package.json b/packages/user/package.json index a9bf8f92d..bedf39fec 100644 --- a/packages/user/package.json +++ b/packages/user/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --noEmit -p tsconfig.vitest.json --composite false" }, "dependencies": { - "supertokens-web-js": "0.6.0", + "supertokens-web-js": "0.7.2", "zod": "3.22.3" }, "devDependencies": { diff --git a/packages/user/src/components/Login/SocialLogins.tsx b/packages/user/src/components/Login/SocialLogins.tsx index 6364d32ed..ca17e6a50 100644 --- a/packages/user/src/components/Login/SocialLogins.tsx +++ b/packages/user/src/components/Login/SocialLogins.tsx @@ -1,9 +1,9 @@ import { useTranslation } from "@dzangolab/react-i18n"; -import { useConfig } from "@/hooks"; - import GoogleLogin from "../GoogleLogin"; +import { useConfig } from "@/hooks"; + export const SUPPORTED_SOCIAL_LOGIN_PROVIDERS = [ "google" as const, // "facebook" as const, diff --git a/packages/user/src/supertokens/google-login.ts b/packages/user/src/supertokens/google-login.ts index b6dc2964c..dab8197e1 100644 --- a/packages/user/src/supertokens/google-login.ts +++ b/packages/user/src/supertokens/google-login.ts @@ -4,8 +4,8 @@ import { getAuthorisationURLWithQueryParamsAndSetState } from "supertokens-web-j const googleLogin = async (redirectUrl: string) => { try { const authUrl = await getAuthorisationURLWithQueryParamsAndSetState({ - authorisationURL: redirectUrl, - providerId: "google", + frontendRedirectURI: redirectUrl, + thirdPartyId: "google", }); window.location.assign(authUrl); diff --git a/packages/user/src/supertokens/index.ts b/packages/user/src/supertokens/index.ts index 5e2f96eb6..38e60aa80 100644 --- a/packages/user/src/supertokens/index.ts +++ b/packages/user/src/supertokens/index.ts @@ -1,6 +1,7 @@ import { AppConfig } from "@dzangolab/react-config"; import SuperTokens from "supertokens-web-js"; import EmailVerification from "supertokens-web-js/recipe/emailverification"; +import Multitenancy from "supertokens-web-js/recipe/multitenancy"; import Session from "supertokens-web-js/recipe/session"; import ThirdPartyEmailPassword from "supertokens-web-js/recipe/thirdpartyemailpassword"; @@ -9,6 +10,7 @@ import { SUPERTOKENS_API_BASE_PATH_DEFAULT } from "@/constants"; const superTokens = (config: AppConfig) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const recipeLists: Array = [ + Multitenancy.init(), Session.init(), ThirdPartyEmailPassword.init(), ]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f06664624..124fdae58 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -623,8 +623,8 @@ importers: packages/user: dependencies: supertokens-web-js: - specifier: 0.6.0 - version: 0.6.0 + specifier: 0.7.2 + version: 0.7.2 zod: specifier: 3.22.3 version: 3.22.3 @@ -12207,8 +12207,8 @@ packages: resolution: {integrity: sha512-r0JFBjkMIdep3Lbk3JA+MpnpuOtw4RSyrlRAbrzMcxwiYco3GFWl/daimQZ5b1forOiUODpOlXbSOljP/oyurg==} dev: false - /supertokens-web-js@0.6.0: - resolution: {integrity: sha512-2KOgWNGanh+/zpdaFQgiA9dQa6T9wA6LcoB6m1BTZ7JIqR3mYmpLD5uu8ERtISNAGUjcXziON/Fp5ZnlBByCcw==} + /supertokens-web-js@0.7.2: + resolution: {integrity: sha512-8TQFfuDzOkdbP/br7AHI8PJaslAYOVmHKT9rxb+v2cuFXYbZzHKoZeY12C1hepqHED8Cbt+rnIIVb2VUYlzd/w==} dependencies: supertokens-js-override: 0.0.4 supertokens-website: 17.0.4