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
daveycodez
daveycodez4mo ago
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
salzar
salzarOP4mo ago
Will do, thanks

Did you find this page helpful?