diff --git a/src/auth.ts b/src/auth.ts index caa192c..5cfc383 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -164,7 +164,8 @@ export class Auth { }; } - const match = path.match(/\/api\/auth\/(?signin|callback)\/(?\w+)/); + const regex = new RegExp(join([this.basePath, `(?signin|callback)/(?\\w+)`])); + const match = path.match(regex); if (match && match.groups) { const provider = this.config?.providers?.find(