packages/dev-utils: add oauthRequestApi factory + dialog

This commit is contained in:
Patrik Oldsberg
2020-05-31 19:40:58 +02:00
parent 43795b8576
commit 6f955a5366
2 changed files with 10 additions and 0 deletions
@@ -22,6 +22,8 @@ import {
createApiFactory,
ErrorAlerter,
AlertApiForwarder,
oauthRequestApiRef,
OAuthRequestManager,
} from '@backstage/core';
// TODO(rugvip): We should likely figure out how to reuse all of these between apps
@@ -41,3 +43,9 @@ export const errorApiFactory = createApiFactory({
factory: ({ alertApi }) =>
new ErrorAlerter(alertApi, new ErrorApiForwarder()),
});
export const oauthRequestApiFactory = createApiFactory({
implements: oauthRequestApiRef,
deps: {},
factory: () => new OAuthRequestManager(),
});
+2
View File
@@ -30,6 +30,7 @@ import {
ApiTestRegistry,
ApiHolder,
AlertDisplay,
OAuthRequestDialog,
} from '@backstage/core';
import * as defaultApiFactories from './apiFactories';
@@ -90,6 +91,7 @@ class DevAppBuilder {
return (
<AppProvider>
<AlertDisplay />
<OAuthRequestDialog />
{this.rootChildren}
<BrowserRouter>
<SidebarPage>