Skip to content

Commit

Permalink
Init amplify in client
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-elliott-nhsd committed Oct 2, 2024
1 parent b6fffaf commit f2912b6
Show file tree
Hide file tree
Showing 21 changed files with 197 additions and 370 deletions.
15 changes: 6 additions & 9 deletions amplify/auth/resource.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { DeepPartialAmplifyGeneratedConfigs } from '@aws-amplify/plugin-types';
import { ClientConfig } from '@aws-amplify/client-config';

const userPoolId = process.env.USER_POOL_ID!;
const userPoolClientId = process.env.USER_POOL_CLIENT_ID ?? '67ts78qj65gn6l68kvae5gbcor'; // temporary hardcoded ID, remove once we can deploy the app
const hostedLoginDomain = process.env.HOSTED_LOGIN_DOMAIN!;
const userPoolId = process.env.USER_POOL_ID;
const userPoolClientId = process.env.USER_POOL_CLIENT_ID;
const hostedLoginDomain = process.env.HOSTED_LOGIN_DOMAIN ?? 'no-domain';

const appId = process.env.AWS_APP_ID!;
const group = process.env.NOTIFY_GROUP!;
const subdomain = process.env.NOTIFY_SUBDOMAIN!;
const domainName = process.env.NOTIFY_DOMAIN_NAME!;
const appId = process.env.AWS_APP_ID;
const subdomain = process.env.NOTIFY_SUBDOMAIN;
const domainName = process.env.NOTIFY_DOMAIN_NAME;

export const authConfig: DeepPartialAmplifyGeneratedConfigs<ClientConfig> = {
auth: {
Expand All @@ -28,12 +27,10 @@ export const authConfig: DeepPartialAmplifyGeneratedConfigs<ClientConfig> = {
'redirect_sign_in_uri': [
`https://${subdomain}.${appId}.amplifyapp.com/auth/`,
`https://${subdomain}.${domainName}/auth/`,
...(group === 'nonprod' ? ['http://localhost:3000/auth/']: [])
],
'redirect_sign_out_uri': [
`https://${subdomain}.${appId}.amplifyapp.com/`,
`https://${subdomain}.${domainName}/`,
...(group === 'nonprod' ? ['http://localhost:3000/']: [])
],
'response_type': 'code'
},
Expand Down
72 changes: 0 additions & 72 deletions app/layout.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions app/page.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions app/styles.css

This file was deleted.

9 changes: 0 additions & 9 deletions components/ConfigureAmplify.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions components/Logout.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions infrastructure/terraform/README

This file was deleted.

Empty file.
5 changes: 0 additions & 5 deletions infrastructure/terraform/components/acct/README

This file was deleted.

5 changes: 0 additions & 5 deletions next-env.d.ts

This file was deleted.

Loading

0 comments on commit f2912b6

Please sign in to comment.