nainglinnkhant
nainglinnkhant
BABetter Auth
Created by nainglinnkhant on 2/18/2025 in #help
OAuth Proxy plugin not working
No description
3 replies
BABetter Auth
Created by nainglinnkhant on 2/13/2025 in #help
Can I share client API routes across subdomains?
I have a monorepo setup and trying to use one app's API routes from another app. (For example, calling localhost:3000's routes from localhost:3001. In production, it will be calling app.domain.com's routes from admin.domain.com) I faced the cors error as expected in local development. Tried to fix it by adding mode: "no-cors":
createAuthClient({
baseURL: [localhost:3000 | app.domain.com],
plugins: [...],
fetchOptions: {
mode: "no-cors",
},
});
createAuthClient({
baseURL: [localhost:3000 | app.domain.com],
plugins: [...],
fetchOptions: {
mode: "no-cors",
},
});
But it didn't work and still getting this error:
ERROR [Better Auth]: TypeError [TypeError: Cannot create property 'callbackURL' on string '{"provider":"github","callbackURL":"/"}']
ERROR [Better Auth]: TypeError [TypeError: Cannot create property 'callbackURL' on string '{"provider":"github","callbackURL":"/"}']
15 replies
BABetter Auth
Created by nainglinnkhant on 2/12/2025 in #help
Social login on server
Can I user social sign in on server like:
const session = await auth.api.signInSocial({
body: { provider, callbackURL },
});
const session = await auth.api.signInSocial({
body: { provider, callbackURL },
});
If I can, what's the proper way to do that? I'm currently using it inside a server action and better auth returns "Invalid URL" even though I've passed in the valid one to the callbackURL.
7 replies
BABetter Auth
Created by nainglinnkhant on 1/29/2025 in #help
How to set additional fields in auth.api.createOrganization?
I've added an additional field called is_personal to the organization schema. Is there any way to set value for that field in auth.api.createOrganization function?
1 replies