Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
auth: allow basePath configuration (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagomera authored Oct 18, 2024
1 parent 79ede79 commit 9404422
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/js/src/auth/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export function AuthHandler<
>;
}[keyof Providers],
>(input: {
basePath?: string;
stream?: boolean;
session?: Sessions;
providers: Providers;
Expand Down Expand Up @@ -104,7 +105,7 @@ export function AuthHandler<
};
};
}) {
const app = new Hono();
const app = input.basePath ? new Hono().basePath(input.basePath) : new Hono();

if (!input.callbacks.auth.error) {
input.callbacks.auth.error = async (err) => {
Expand Down

0 comments on commit 9404422

Please sign in to comment.