diff --git a/plugins/auth-oauth2/src/grants/authorizationCode.ts b/plugins/auth-oauth2/src/grants/authorizationCode.ts index 781cbaab..b1bdb2b3 100644 --- a/plugins/auth-oauth2/src/grants/authorizationCode.ts +++ b/plugins/auth-oauth2/src/grants/authorizationCode.ts @@ -56,7 +56,7 @@ export async function getAuthorizationCode( try { authorizationUrl = new URL(`${authorizationUrlRaw ?? ''}`); } catch { - throw new Error('Invalid authorization URL: ' + authorizationUrlRaw); + throw new Error(`Invalid authorization URL "${authorizationUrlRaw}"`); } authorizationUrl.searchParams.set('response_type', 'code'); authorizationUrl.searchParams.set('client_id', clientId); diff --git a/plugins/auth-oauth2/src/grants/implicit.ts b/plugins/auth-oauth2/src/grants/implicit.ts index 585f0589..625f255a 100644 --- a/plugins/auth-oauth2/src/grants/implicit.ts +++ b/plugins/auth-oauth2/src/grants/implicit.ts @@ -35,7 +35,7 @@ export async function getImplicit( try { authorizationUrl = new URL(`${authorizationUrlRaw ?? ''}`); } catch { - throw new Error('Invalid authorization URL: ' + authorizationUrlRaw); + throw new Error(`Invalid authorization URL "${authorizationUrlRaw}"`); } authorizationUrl.searchParams.set('response_type', 'token'); authorizationUrl.searchParams.set('client_id', clientId);