Seeking advice: Passing client object to "@auth" package
I need expert advice on passing a client object to the "@auth" package in my Remix application.
In the login route (app/routes/_auth/login.tsx), I call the loginUser method from the "@auth" package and pass the client object.
However, I also need the client object to be accessible in other parts of the package, such as auth.server.ts and session.server.ts.
I appreciate any advice on ensuring the availability of the client object throughout the "@auth" package. Thank you!
In session.server.ts:
import { createCookieSessionStorage } from "@remix-run/node";
import type { User, UserProfile } from the client here
export interface UserAuthSession extends User {
// userProfile: UserProfile;
}
I would greatly appreciate any expert advice on ensuring that the client object is accessible throughout the "@auth" package code. Thank you!