diff --git a/plugins/auth-backend/src/providers/okta/provider.ts b/plugins/auth-backend/src/providers/okta/provider.ts index 44e26bb7fe..7ea5b29e80 100644 --- a/plugins/auth-backend/src/providers/okta/provider.ts +++ b/plugins/auth-backend/src/providers/okta/provider.ts @@ -275,6 +275,10 @@ export const createOktaProvider = ( const audience = envConfig.getString('audience'); const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + if (!audience.startsWith('https')) { + throw new Error("URL for 'audience' must start with 'https'."); + } + const catalogIdentityClient = new CatalogIdentityClient({ catalogApi, tokenIssuer,