mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2025-08-03 13:48:09 +02:00
🐛 Dynamically build RegExp
with basePath
This commit is contained in:
parent
98f73f36ea
commit
39c9793a78
@ -164,7 +164,8 @@ export class Auth {
|
||||
};
|
||||
}
|
||||
|
||||
const match = path.match(/\/api\/auth\/(?<method>signin|callback)\/(?<provider>\w+)/);
|
||||
const regex = new RegExp(join([this.basePath, `(?<method>signin|callback)/(?<provider>\\w+)`]));
|
||||
const match = path.match(regex);
|
||||
|
||||
if (match && match.groups) {
|
||||
const provider = this.config?.providers?.find(
|
||||
|
Loading…
Reference in New Issue
Block a user