Skip to content

Commit

Permalink
chore(remix): Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
brkalow committed Dec 15, 2023
1 parent 92cbd74 commit 6325c0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/remix/src/ssr/getAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export async function getAuth(args: LoaderFunctionArgs, opts?: GetAuthOptions):
if (!args || (args && (!args.request || !args.context))) {
throw new Error(noLoaderArgsPassedInGetAuth);
}

// Note: authenticateRequest() will throw a redirect if the auth state is determined to be handshake
const requestState = await authenticateRequest(args, opts);

return sanitizeAuthObject(requestState.toAuth());
Expand Down
1 change: 1 addition & 0 deletions packages/remix/src/ssr/rootAuthLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const rootAuthLoader: RootAuthLoader = async (
? handlerOrOptions
: {};

// Note: authenticateRequest() will throw a redirect if the auth state is determined to be handshake
const requestState = await authenticateRequest(args, opts);

if (!handler) {
Expand Down

0 comments on commit 6325c0e

Please sign in to comment.