significant refactor
This commit is contained in:
@@ -9,28 +9,30 @@ import { logger } from "./";
|
||||
|
||||
export const backendConfig = (): TypeInput => {
|
||||
return {
|
||||
framework: 'custom',
|
||||
framework: "custom",
|
||||
supertokens: {
|
||||
connectionURI: import.meta.env.VITE_SUPERTOKENS_URI || "https://try.supertokens.io",
|
||||
connectionURI:
|
||||
import.meta.env.VITE_SUPERTOKENS_URI || "https://try.supertokens.io",
|
||||
},
|
||||
appInfo,
|
||||
recipeList: [
|
||||
PasswordlessDevelopmentMode.init(),
|
||||
Session.init({
|
||||
cookieSameSite: "lax",
|
||||
cookieSecure: process.env.NODE_ENV === 'production',
|
||||
cookieDomain: process.env.NODE_ENV === 'production' ? ".example.com" : undefined,
|
||||
antiCsrf: process.env.NODE_ENV === 'production' ? "VIA_TOKEN" : "NONE",
|
||||
|
||||
cookieSecure: process.env.NODE_ENV === "production",
|
||||
cookieDomain:
|
||||
process.env.NODE_ENV === "production" ? ".example.com" : undefined,
|
||||
antiCsrf: process.env.NODE_ENV === "production" ? "VIA_TOKEN" : "NONE",
|
||||
|
||||
// Debug only
|
||||
exposeAccessTokenToFrontendInCookieBasedAuth: true,
|
||||
}),
|
||||
Dashboard.init(),
|
||||
UserRoles.init()
|
||||
UserRoles.init(),
|
||||
],
|
||||
telemetry: process.env.NODE_ENV !== 'production',
|
||||
telemetry: process.env.NODE_ENV !== "production",
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
let initialized = false;
|
||||
export function ensureSuperTokensBackend() {
|
||||
|
||||
Reference in New Issue
Block a user