We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89b9f34 commit 0d82725Copy full SHA for 0d82725
components/server/src/auth/generic-auth-provider.ts
@@ -238,8 +238,13 @@ export class GenericAuthProvider implements AuthProvider {
238
}
239
240
241
+ protected cachedAuthCallbackPath: string | undefined = undefined;
242
get authCallbackPath() {
- return new URL(this.oauthConfig.callBackUrl).pathname;
243
+ // This ends up being called quite often so we cache the URL constructor
244
+ if (this.cachedAuthCallbackPath === undefined) {
245
+ this.cachedAuthCallbackPath = new URL(this.oauthConfig.callBackUrl).pathname;
246
+ }
247
+ return this.cachedAuthCallbackPath;
248
249
250
0 commit comments