ayersss
ayersss
BABetter Auth
Created by ayersss on 4/18/2025 in #help
Account linking extra info
I have a question regarding account linking (using Google as the provider). Right now, I’m able to link an additional account with a different email address by using allowDifferentEmails: true. it seems like there’s no way to extend the account schema. I think it’s pretty common to have information like the name and email of a newly linked Google account, so that on the client side — when using authClient.listAccounts — I can display each account’s name, email, or other relevant info. I tried using the hooks and databaseHooks, but I couldn’t get it to work.
2 replies
BABetter Auth
Created by ayersss on 4/15/2025 in #help
Auth service in microservice architecture
I'm trying to build a Hono backend setup with two separate services: One serves as the auth server that handles all user-related logic (base path: /auth), and the other handles business logic (base path: /api). In production, both will be hosted on the same domain. Locally, I'm using localhost:3000 for the business logic and localhost:3001 for auth. Currently, I’m able to log in with Google OAuth via the auth server from the frontend but when I try to fetch data from the API backend, the session is null, which results in a 401 error. I’ve looked through previous threads, and it seems like using the jwt plugin is a solution? How should I configure the better-auth instance to work across both applications?
11 replies