Replies: 3 comments
-
|
the max length has been fixed i think because of options.extraPlugins but the rest of the issues persist |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
commenting out the authapi from createTRPCContext's return statement fixes all the type errors but may have some unforseen consequence |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
You only need to add the type export interface TRPCContextReturn {
authApi: Auth["api"];
session: Awaited<ReturnType<Auth["api"]["getSession"]>>;
db: typeof db;
}
export const createTRPCContext = async (opts: {
headers: Headers;
auth: Auth;
}): Promise<TRPCContextReturn> => {
const authApi = opts.auth.api;
const session = await authApi.getSession({
headers: opts.headers,
});
return {
authApi,
session,
db,
};
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
when using plugins in betterauth it breaks trpc , here are the errors i got
just the t3 turbo plugins cause this error
and removing the user schema additions removes the error
here is my better auth config
here is what is needed to fix the errors
how can i fix these issues without a loss of functionality
Beta Was this translation helpful? Give feedback.
All reactions