Export Atlassian OAuth Profile type

Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
This commit is contained in:
Olivier Liechti
2024-07-09 15:08:24 +02:00
parent 3cdea7aa1e
commit efda5a301d
3 changed files with 8 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend': patch
---
Use new Atlassian Passport profile in type definition
@@ -13,13 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The atlassian-provider backend module for the auth plugin.
*
* @packageDocumentation
*/
export { atlassianAuthenticator } from './authenticator';
export type { AtlassianPassportProfile } from './authenticator';
export { authModuleAtlassianProvider as default } from './module';
export { atlassianSignInResolvers } from './resolvers';
@@ -26,6 +26,7 @@ import {
import { OAuthResult } from '../../lib/oauth';
import { createAuthProviderIntegration } from '../createAuthProviderIntegration';
import { AuthHandler } from '../types';
import { AtlassianPassportProfile } from '@backstage/plugin-auth-backend-module-atlassian-provider';
/**
* Auth provider integration for Atlassian auth
@@ -47,7 +48,7 @@ export const atlassian = createAuthProviderIntegration({
resolver: SignInResolver<OAuthResult>;
};
}) {
return createOAuthProviderFactory({
return createOAuthProviderFactory<AtlassianPassportProfile>({
authenticator: atlassianAuthenticator,
profileTransform: adaptLegacyOAuthHandler(options?.authHandler),
signInResolver: adaptLegacyOAuthSignInResolver(options?.signIn?.resolver),