Best method to authenticate across multiple apps
Hi,
I am trying to figure out the best way to authenticate across multiple apps. I am a bit confused about the SSO, and OIDC server, though it seems like that may be the way to go. I also thought of using ElysiaJS to create just a better-auth server, then updating BETTER_AUTH_URL to be the same across all my apps. Im a bit stuck, any help would be appreciated!
2 Replies
I'd try these settings in your auth config, put all your website URL's into trustedOrigins
trustedOrigins: ["http://localhost:3000"], advanced: { defaultCookieAttributes: process.env.NODE_ENV === "production" ? { sameSite: "none", secure: process.env.NODE_ENV === "production", } : undefined }, the NODE_ENV checks are for Safari dev testing
trustedOrigins: ["http://localhost:3000"], advanced: { defaultCookieAttributes: process.env.NODE_ENV === "production" ? { sameSite: "none", secure: process.env.NODE_ENV === "production", } : undefined }, the NODE_ENV checks are for Safari dev testing
Will do, thanks