diff --git a/.changeset/fair-seals-burn.md b/.changeset/fair-seals-burn.md index fcc8fe5949..51cdacbc38 100644 --- a/.changeset/fair-seals-burn.md +++ b/.changeset/fair-seals-burn.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-auth-node': minor +'@backstage/plugin-auth-node': patch --- Accepts an optional options object in the `PassportOAuthAuthenticatorHelper.authenticate` method. diff --git a/plugins/auth-backend-module-auth0-provider/api-report.md b/plugins/auth-backend-module-auth0-provider/api-report.md index 87b5a8b482..fb7aa9d0ba 100644 --- a/plugins/auth-backend-module-auth0-provider/api-report.md +++ b/plugins/auth-backend-module-auth0-provider/api-report.md @@ -3,12 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import Auth0InternalStrategy from 'passport-auth0'; import { BackendFeature } from '@backstage/backend-plugin-api'; import { OAuthAuthenticator } from '@backstage/plugin-auth-node'; import { PassportOAuthAuthenticatorHelper } from '@backstage/plugin-auth-node'; import { PassportProfile } from '@backstage/plugin-auth-node'; -import { StateStore } from 'passport-oauth2'; // @public (undocumented) export const auth0Authenticator: OAuthAuthenticator< @@ -21,30 +19,6 @@ export const auth0Authenticator: OAuthAuthenticator< PassportProfile >; -// @public (undocumented) -export class Auth0Strategy extends Auth0InternalStrategy { - constructor( - options: Auth0StrategyOptionsWithRequest, - verify: Auth0InternalStrategy.VerifyFunction, - ); -} - -// @public (undocumented) -export interface Auth0StrategyOptionsWithRequest { - // (undocumented) - callbackURL: string; - // (undocumented) - clientID: string; - // (undocumented) - clientSecret: string; - // (undocumented) - domain: string; - // (undocumented) - passReqToCallback: true; - // (undocumented) - store: StateStore; -} - // @public (undocumented) const authModuleAuth0Provider: BackendFeature; export default authModuleAuth0Provider; diff --git a/plugins/auth-backend-module-auth0-provider/package.json b/plugins/auth-backend-module-auth0-provider/package.json index 34276a0608..a9422162a0 100644 --- a/plugins/auth-backend-module-auth0-provider/package.json +++ b/plugins/auth-backend-module-auth0-provider/package.json @@ -36,8 +36,6 @@ "dependencies": { "@backstage/backend-plugin-api": "workspace:^", "@backstage/plugin-auth-node": "workspace:^", - "@types/passport-auth0": "^1.0.5", - "@types/passport-oauth2": "^1.4.15", "express": "^4.17.1", "passport-auth0": "^1.4.3", "passport-oauth2": "^1.6.1" @@ -47,6 +45,8 @@ "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", "@backstage/plugin-auth-backend": "workspace:^", + "@types/passport-auth0": "^1.0.5", + "@types/passport-oauth2": "^1.4.15", "supertest": "^6.3.3" }, "configSchema": "config.d.ts" diff --git a/plugins/auth-backend-module-auth0-provider/src/index.ts b/plugins/auth-backend-module-auth0-provider/src/index.ts index 34c8b9a85e..eb8f4efcbe 100644 --- a/plugins/auth-backend-module-auth0-provider/src/index.ts +++ b/plugins/auth-backend-module-auth0-provider/src/index.ts @@ -20,9 +20,5 @@ * @packageDocumentation */ -export { - Auth0Strategy, - type Auth0StrategyOptionsWithRequest, -} from './strategy'; export { auth0Authenticator } from './authenticator'; export { authModuleAuth0Provider as default } from './module'; diff --git a/plugins/auth-backend-module-auth0-provider/src/strategy.ts b/plugins/auth-backend-module-auth0-provider/src/strategy.ts index 42625eb77d..039885dddb 100644 --- a/plugins/auth-backend-module-auth0-provider/src/strategy.ts +++ b/plugins/auth-backend-module-auth0-provider/src/strategy.ts @@ -15,7 +15,7 @@ */ import Auth0InternalStrategy from 'passport-auth0'; -import { StateStore } from 'passport-oauth2'; +import type { StateStore } from 'passport-oauth2'; /** @public */ export interface Auth0StrategyOptionsWithRequest { diff --git a/yarn.lock b/yarn.lock index c6a5ddaab5..c15bf8bc00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27243,6 +27243,18 @@ __metadata: languageName: node linkType: hard +"formidable@npm:^2.1.2": + version: 2.1.2 + resolution: "formidable@npm:2.1.2" + dependencies: + dezalgo: ^1.0.4 + hexoid: ^1.0.0 + once: ^1.4.0 + qs: ^6.11.0 + checksum: 81c8e5d89f5eb873e992893468f0de22c01678ca3d315db62be0560f9de1c77d4faefc9b1f4575098eb2263b3c81ba1024833a9fc3206297ddbac88a4f69b7a8 + languageName: node + linkType: hard + "formidable@npm:^3.5.1": version: 3.5.1 resolution: "formidable@npm:3.5.1" @@ -41172,6 +41184,24 @@ __metadata: languageName: node linkType: hard +"superagent@npm:^8.1.2": + version: 8.1.2 + resolution: "superagent@npm:8.1.2" + dependencies: + component-emitter: ^1.3.0 + cookiejar: ^2.1.4 + debug: ^4.3.4 + fast-safe-stringify: ^2.1.1 + form-data: ^4.0.0 + formidable: ^2.1.2 + methods: ^1.1.2 + mime: 2.6.0 + qs: ^6.11.0 + semver: ^7.3.8 + checksum: f3601c5ccae34d5ba684a03703394b5d25931f4ae2e1e31a1de809f88a9400e997ece037f9accf148a21c408f950dc829db1e4e23576a7f9fe0efa79fd5c9d2f + languageName: node + linkType: hard + "superagent@npm:^9.0.1": version: 9.0.2 resolution: "superagent@npm:9.0.2" @@ -41189,6 +41219,16 @@ __metadata: languageName: node linkType: hard +"supertest@npm:^6.3.3": + version: 6.3.4 + resolution: "supertest@npm:6.3.4" + dependencies: + methods: ^1.1.2 + superagent: ^8.1.2 + checksum: 875c6fa7940f21e5be9bb646579cdb030d4057bf2da643e125e1f0480add1200395d2b17e10b8e54e1009efc63e047422501e9eb30e12828668498c0910f295f + languageName: node + linkType: hard + "supertest@npm:^7.0.0": version: 7.0.0 resolution: "supertest@npm:7.0.0"