Merge pull request #925 from spotify/rugvip/gauth

Add GoogleAuth, AuthConnector, and RefreshingAuthSessionManager
This commit is contained in:
Patrik Oldsberg
2020-05-22 15:49:06 +02:00
committed by GitHub
31 changed files with 1729 additions and 366 deletions
+2 -1
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { createApp } from '@backstage/core';
import { createApp, OAuthRequestDialog } from '@backstage/core';
import React, { FC } from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import Root from './components/Root';
@@ -33,6 +33,7 @@ const AppComponent = app.getRootComponent();
const App: FC<{}> = () => (
<AppProvider>
<AlertDisplay forwarder={alertApiForwarder} />
<OAuthRequestDialog />
<Router>
<Root>
<AppComponent />
+18
View File
@@ -23,6 +23,10 @@ import {
ErrorApiForwarder,
featureFlagsApiRef,
FeatureFlags,
GoogleAuth,
oauthRequestApiRef,
OAuthRequestManager,
googleAuthApiRef,
} from '@backstage/core';
import {
@@ -46,6 +50,20 @@ builder.add(featureFlagsApiRef, new FeatureFlags());
builder.add(lighthouseApiRef, new LighthouseRestApi('http://localhost:3003'));
const oauthRequestApi = builder.add(
oauthRequestApiRef,
new OAuthRequestManager(),
);
builder.add(
googleAuthApiRef,
GoogleAuth.create({
apiOrigin: 'http://localhost:7000',
basePath: '/auth/',
oauthRequestApi,
}),
);
builder.add(
techRadarApiRef,
new TechRadar({