Skip to content

Commit 287f566

Browse files
committed
userId param is no longer used
1 parent 36ef44f commit 287f566

7 files changed

Lines changed: 6 additions & 8 deletions

File tree

apps/webapp/app/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
7070
// current effective session duration.
7171
if (user) {
7272
const authSession = await getUserSession(request);
73-
headers.append("Set-Cookie", await commitAuthenticatedSessionLazy(authSession, user.id));
73+
headers.append("Set-Cookie", await commitAuthenticatedSessionLazy(authSession));
7474
}
7575

7676
return typedjson(

apps/webapp/app/routes/auth.github.callback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export let loader: LoaderFunction = async ({ request }) => {
5353
session.set(authenticator.sessionKey, auth);
5454

5555
const headers = new Headers();
56-
headers.append("Set-Cookie", await commitAuthenticatedSession(session, auth.userId));
56+
headers.append("Set-Cookie", await commitAuthenticatedSession(session));
5757
headers.append("Set-Cookie", await setLastAuthMethodHeader("github"));
5858

5959
await trackAndClearReferralSource(request, auth.userId, headers);

apps/webapp/app/routes/auth.google.callback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export let loader: LoaderFunction = async ({ request }) => {
5353
session.set(authenticator.sessionKey, auth);
5454

5555
const headers = new Headers();
56-
headers.append("Set-Cookie", await commitAuthenticatedSession(session, auth.userId));
56+
headers.append("Set-Cookie", await commitAuthenticatedSession(session));
5757
headers.append("Set-Cookie", await setLastAuthMethodHeader("google"));
5858

5959
await trackAndClearReferralSource(request, auth.userId, headers);

apps/webapp/app/routes/login.mfa/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ async function completeLogin(request: Request, session: Session, userId: string)
163163
session.unset("pending-mfa-redirect-to");
164164

165165
const headers = new Headers();
166-
headers.append("Set-Cookie", await commitAuthenticatedSession(session, userId));
166+
headers.append("Set-Cookie", await commitAuthenticatedSession(session));
167167

168168
await trackAndClearReferralSource(request, userId, headers);
169169

apps/webapp/app/routes/magic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
5656
session.set(authenticator.sessionKey, auth);
5757

5858
const headers = new Headers();
59-
headers.append("Set-Cookie", await commitAuthenticatedSession(session, auth.userId));
59+
headers.append("Set-Cookie", await commitAuthenticatedSession(session));
6060
headers.append("Set-Cookie", await setLastAuthMethodHeader("email"));
6161

6262
await trackAndClearReferralSource(request, auth.userId, headers);

apps/webapp/app/routes/resources.account.session-duration/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function action({ request }: ActionFunctionArgs) {
6363
// Re-issue the cookie with the new maxAge and reset issuedAt so the user
6464
// gets a fresh window matching their new selection right away.
6565
const authSession = await getUserSession(request);
66-
const authCookie = await commitAuthenticatedSession(authSession, userId);
66+
const authCookie = await commitAuthenticatedSession(authSession);
6767

6868
const messageSession = await getMessageSession(request.headers.get("cookie"));
6969
setSuccessMessage(messageSession, "Session duration updated.");

apps/webapp/app/services/sessionDuration.server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ export function ensureSessionIssuedAt(session: Session, now: number = Date.now()
167167
*/
168168
export async function commitAuthenticatedSession(
169169
session: Session,
170-
_userId: string,
171170
now: number = Date.now()
172171
): Promise<string> {
173172
setSessionIssuedAt(session, now);
@@ -181,7 +180,6 @@ export async function commitAuthenticatedSession(
181180
*/
182181
export async function commitAuthenticatedSessionLazy(
183182
session: Session,
184-
_userId: string,
185183
now: number = Date.now()
186184
): Promise<string> {
187185
ensureSessionIssuedAt(session, now);

0 commit comments

Comments
 (0)