Skip to content

Commit

Permalink
feat: updated authentication configuration for hca-dcp managed access (
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran McDade authored and Fran McDade committed Dec 11, 2023
1 parent 45f22bd commit 3ae4328
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { AuthenticationConfig } from "../../../../../../data-explorer/packages/data-explorer-ui/src/config/entities";
import * as MDX from "../../../../app/components/common/MDXContent/hca-dcp";

// TODO(cc) update authentication config.

export const authenticationConfig: AuthenticationConfig = {
googleGISAuthConfig: {
clientId:
Expand Down
1 change: 1 addition & 0 deletions explorer/site-config/hca-dcp/cc-ma-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const config: SiteConfig = {
authentication: authenticationConfig,
};

// Adding authentication to the header.
const header = { ...config.layout.header };
config.layout.header = { ...header, authenticationEnabled: true };

Expand Down
7 changes: 7 additions & 0 deletions explorer/site-config/hca-dcp/ma-dev/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SiteConfig } from "@clevercanary/data-explorer-ui/lib/config/entities";
import { authenticationConfig } from "../cc-ma-dev/authentication/authentication";
import { makeConfig } from "../dev/config";

// Template constants
Expand All @@ -9,8 +10,14 @@ const PORTAL_URL = "https://data.dev.singlecell.gi.ucsc.edu";

const config: SiteConfig = {
...makeConfig(BROWSER_URL, PORTAL_URL, DATA_URL, CATALOG),
authentication: authenticationConfig,
};

// Adding authentication to the header.
const header = { ...config.layout.header };
config.layout.header = { ...header, authenticationEnabled: true };

// Removing analytics from the config.
if (config.analytics) {
config.analytics = undefined;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { AuthenticationConfig } from "../../../../../../data-explorer/packages/data-explorer-ui/src/config/entities";
import * as MDX from "../../../../app/components/common/MDXContent/hca-dcp";

// TODO(cc) update authentication config.

export const authenticationConfig: AuthenticationConfig = {
googleGISAuthConfig: {
clientId:
"561542988117-9e04fhfrc9su130eb2ggea7bdppolkjq.apps.googleusercontent.com", // TODO(cc) update clientId.
googleProfileEndpoint: "https://www.googleapis.com/oauth2/v3/userinfo",
scope:
"https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile openid",
},
termsOfService: MDX.RenderComponent({ Component: MDX.LoginTermsOfService }),
terraAuthConfig: {
termsOfServiceEndpoint:
"https://sam.dsde-dev.broadinstitute.org/register/user/v2/self/termsOfServiceDetails",
terraProfileEndpoint:
"https://sam.dsde-dev.broadinstitute.org/register/user/v1",
},
text: MDX.RenderComponent({ Component: MDX.LoginText }),
title: "Sign in to your account",
};
6 changes: 6 additions & 0 deletions explorer/site-config/hca-dcp/ma-prod/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SiteConfig } from "@clevercanary/data-explorer-ui/lib/config/entities";
import { makeConfig } from "../dev/config";
import { authenticationConfig } from "./authentication/authentication";

// Template constants
const BROWSER_URL = "https://ma-pilot.explore.data.humancellatlas.org";
Expand All @@ -8,8 +9,13 @@ const PORTAL_URL = "https://data.humancellatlas.org";

const config: SiteConfig = {
...makeConfig(BROWSER_URL, PORTAL_URL, DATA_URL),
authentication: authenticationConfig,
};

// Adding authentication to the header.
const header = { ...config.layout.header };
config.layout.header = { ...header, authenticationEnabled: true };

// Update gtmAuth for the prod environment lookup.
if (config.analytics) {
const analytics = { ...config.analytics };
Expand Down

0 comments on commit 3ae4328

Please sign in to comment.