-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (cdk): wrote infrastructure for provisioning auth and identity p…
…roviders (#32) * feat(webapp): updated UI icons for OAuth sign in buttons. * fix(webapp): fixed pyodide type errors related to globalThis.. * feat(webapp): added a loading spinner for OAuth sign in buttons. * refactor(webapp): improved descriptiveness of the auth stack while initializing. * feat(cdk): made sure environment variables are formatted correctly. * feat(webapp): improved the UI design for the login screen. * feat(cdk): added local-env-info.json. * feat: temporary storage. * feat(webapp): added google federated login. * feat(webapp): exported aws cdk values to json. * feat(cdk): added facebook federated login. * feat(cdk): added apple federated login. * docs: added instructions for setup. * Added instructions for setup like setting environment variables.
- Loading branch information
Showing
26 changed files
with
2,471 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Documentation | ||
## Setting up | ||
### CDK | ||
A file `apps/snakecode-cdk/.env` should be created with the following content. | ||
|
||
```bash | ||
GOOGLE_CLIENT_ID=[YOUR GOOGLE CLIENT ID] | ||
GOOGLE_CLIENT_SECRET=[YOUR GOOGLE CLIENT SECRET] | ||
|
||
FACEBOOK_CLIENT_ID=[YOUR FACEBOOK CLIENT ID] | ||
FACEBOOK_CLIENT_SECRET=[YOUR FACEBOOK CLIENT SECRET] | ||
|
||
APPLE_CLIENT_ID=[YOUR APPLE CLIENT ID] | ||
APPLE_CLIENT_SECRET=[YOUR APPLE CLIENT SECRET] | ||
APPLE_KEY_ID=[YOUR APPLE KEY ID] | ||
APPLE_PRIVATE_KEY=[YOUR APPLE PRIVATE KEY] | ||
APPLE_TEAM_ID=[YOUR APPLE TEAM ID] | ||
``` | ||
|
||
To get these values, create an OAuth 2.0 Client ID in your Google Developer Console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,6 @@ node_modules | |
cdk.out | ||
|
||
!jest.config.js | ||
!.eslintrc.js | ||
!.eslintrc.js | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import dotenv from 'dotenv' | ||
import { cleanEnv, str } from 'envalid' | ||
|
||
dotenv.config() | ||
|
||
// Log an error message and exit (in Node) if any required env variables are missing | ||
const Env = cleanEnv(process.env, { | ||
GOOGLE_CLIENT_ID: str(), | ||
GOOGLE_CLIENT_SECRET: str(), | ||
|
||
FACEBOOK_CLIENT_ID: str(), | ||
FACEBOOK_CLIENT_SECRET: str(), | ||
|
||
APPLE_CLIENT_ID: str(), | ||
APPLE_CLIENT_SECRET: str(), | ||
APPLE_KEY_ID: str(), | ||
APPLE_PRIVATE_KEY: str(), | ||
APPLE_TEAM_ID: str(), | ||
}) | ||
|
||
export default Env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"snakecode-amplify-stack": { | ||
"amplifyid": "d3thed3kk59i2n", | ||
"userpoolsdomainurl": "snakecode-dev.auth.us-west-2.amazoncognito.com", | ||
"identitypoolid": "us-west-2:db458b37-0e50-4284-beb1-75c1e9c72890", | ||
"userpoolswebclientid": "3j97ggu8ccurvnnc4tkc3aua13", | ||
"userpoolsid": "us-west-2_93GYjaMY6", | ||
"region": "us-west-2", | ||
"cognitoregion": "us-west-2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
declare module globalThis { | ||
function loadPyodide(): any | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"envName": "dev" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.