Removed unused config value
The config value `audience` was used to set the baseUrl which has a static value. The audience parameter is static in the used library. Therefore, the reading of the config value was removed. Signed-off-by: Severin Wischmann <severinwischmann@nianticlabs.com>
This commit is contained in:
@@ -29,8 +29,7 @@ export const atlassianAuthenticator = createOAuthAuthenticator({
|
||||
initialize({ callbackUrl, config }) {
|
||||
const clientId = config.getString('clientId');
|
||||
const clientSecret = config.getString('clientSecret');
|
||||
const baseUrl =
|
||||
config.getOptionalString('audience') || 'https://api.atlassian.com';
|
||||
const baseUrl = 'https://auth.atlassian.com';
|
||||
|
||||
return PassportOAuthAuthenticatorHelper.from(
|
||||
new AtlassianStrategy(
|
||||
|
||||
@@ -60,7 +60,7 @@ describe('authModuleAtlassianProvider', () => {
|
||||
expect(nonceCookie).toBeDefined();
|
||||
|
||||
const startUrl = new URL(res.get('location'));
|
||||
expect(startUrl.origin).toBe('https://api.atlassian.com');
|
||||
expect(startUrl.origin).toBe('https://auth.atlassian.com');
|
||||
expect(startUrl.pathname).toBe('/authorize');
|
||||
expect(Object.fromEntries(startUrl.searchParams)).toEqual({
|
||||
response_type: 'code',
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AuthHandler } from '../types';
|
||||
import { OAuthResult } from '../../lib/oauth';
|
||||
import { createAuthProviderIntegration } from '../createAuthProviderIntegration';
|
||||
import { atlassianAuthenticator } from '@backstage/plugin-auth-backend-module-atlassian-provider';
|
||||
import {
|
||||
SignInResolver,
|
||||
createOAuthProviderFactory,
|
||||
@@ -25,7 +23,9 @@ import {
|
||||
adaptLegacyOAuthHandler,
|
||||
adaptLegacyOAuthSignInResolver,
|
||||
} from '../../lib/legacy';
|
||||
import { atlassianAuthenticator } from '@backstage/plugin-auth-backend-module-atlassian-provider';
|
||||
import { OAuthResult } from '../../lib/oauth';
|
||||
import { createAuthProviderIntegration } from '../createAuthProviderIntegration';
|
||||
import { AuthHandler } from '../types';
|
||||
|
||||
/**
|
||||
* Auth provider integration for Atlassian auth
|
||||
|
||||
Reference in New Issue
Block a user