const authPrefix = '/api/v1/auth';
app.use((req: Request, res: Response, next: NextFunction) => {
if (!req.url.startsWith(authPrefix)) return next();
const handler = toNodeHandler(auth);
return handler(req, res);
});
export const authClient = createAuthClient({
baseURL: ${process.env.NEXT_PUBLIC_SERVER_URL ?? 'http://localhost:3000'}/api/v1/auth, socialProviders: {
linear: {
clientId: "xxx",
clientSecret: "xxx",
scope: ["read", "write", "issues:create"],
redirectURI: "http://localhost:3000/api/v1/auth/linear/callback",
},
},