Adds Auth0 as IdP

This commit is contained in:
Jaime Mendes
2020-07-14 00:02:43 +01:00
parent 5e36d0cf28
commit fed39a1fa7
19 changed files with 656 additions and 2 deletions
@@ -30,6 +30,8 @@ import {
githubAuthApiRef,
GitlabAuth,
gitlabAuthApiRef,
Auth0Auth,
auth0AuthApiRef,
} from '@backstage/core';
// TODO(rugvip): We should likely figure out how to reuse all of these between apps
@@ -88,3 +90,14 @@ export const gitlabAuthApiFactory = createApiFactory({
oauthRequestApi,
}),
});
export const auth0AuthApiFactory = createApiFactory({
implements: auth0AuthApiRef,
deps: { oauthRequestApi: oauthRequestApiRef },
factory: ({ oauthRequestApi }) =>
Auth0Auth.create({
apiOrigin: 'http://localhost:7000',
basePath: '/auth/',
oauthRequestApi,
}),
});