add microsoft azure auth provider + add to example app

This commit is contained in:
Chris Simmons
2020-08-21 15:46:17 +12:00
parent 95596b8129
commit b253c56526
15 changed files with 753 additions and 1 deletions
+15 -1
View File
@@ -30,6 +30,7 @@ import {
OktaAuth,
GitlabAuth,
Auth0Auth,
MicrosoftAuth,
oauthRequestApiRef,
OAuthRequestManager,
googleAuthApiRef,
@@ -38,6 +39,7 @@ import {
oktaAuthApiRef,
gitlabAuthApiRef,
auth0AuthApiRef,
microsoftAuthApiRef,
storageApiRef,
WebStorage,
} from '@backstage/core';
@@ -74,7 +76,10 @@ import {
TravisCIApi,
travisCIApiRef,
} from '@roadiehq/backstage-plugin-travis-ci';
import { GithubPullRequestsClient, githubPullRequestsApiRef } from '@roadiehq/backstage-plugin-github-pull-requests';
import {
GithubPullRequestsClient,
githubPullRequestsApiRef,
} from '@roadiehq/backstage-plugin-github-pull-requests';
export const apis = (config: ConfigApi) => {
// eslint-disable-next-line no-console
@@ -122,6 +127,15 @@ export const apis = (config: ConfigApi) => {
}),
);
builder.add(
microsoftAuthApiRef,
MicrosoftAuth.create({
backendUrl,
basePath: '/auth/',
oauthRequestApi,
}),
);
const githubAuthApi = builder.add(
githubAuthApiRef,
GithubAuth.create({
+7
View File
@@ -19,6 +19,7 @@ import {
gitlabAuthApiRef,
oktaAuthApiRef,
githubAuthApiRef,
microsoftAuthApiRef,
} from '@backstage/core';
export const providers = [
@@ -28,6 +29,12 @@ export const providers = [
message: 'Sign In using Google',
apiRef: googleAuthApiRef,
},
{
id: 'microsoft-auth-provider',
title: 'Microsoft',
message: 'Sign In using Microsoft Azure AD',
apiRef: microsoftAuthApiRef,
},
{
id: 'gitlab-auth-provider',
title: 'Gitlab',