├── 1 - Setup ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── UserPool.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.css │ ├── reportWebVitals.js │ ├── index.js │ ├── App.js │ ├── App.css │ └── logo.svg ├── .gitignore ├── package.json └── README.md ├── 3 - Login ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── UserPool.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.css │ ├── reportWebVitals.js │ ├── App.js │ ├── index.js │ ├── App.css │ ├── Components │ │ ├── Login.js │ │ └── Register.js │ └── logo.svg ├── .gitignore ├── package.json └── README.md ├── 4 - Session ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── UserPool.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.css │ ├── reportWebVitals.js │ ├── index.js │ ├── App.js │ ├── App.css │ ├── Components │ │ ├── Status.js │ │ ├── Login.js │ │ ├── Account.js │ │ └── Register.js │ └── logo.svg ├── .gitignore ├── package.json └── README.md └── 2 - Registration ├── public ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── manifest.json └── index.html ├── src ├── UserPool.js ├── setupTests.js ├── App.test.js ├── App.js ├── index.css ├── reportWebVitals.js ├── index.js ├── App.css ├── Components │ └── Register.js └── logo.svg ├── .gitignore ├── package.json └── README.md /1 - Setup/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /3 - Login/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /4 - Session/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /2 - Registration/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /1 - Setup/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/1 - Setup/public/favicon.ico -------------------------------------------------------------------------------- /1 - Setup/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/1 - Setup/public/logo192.png -------------------------------------------------------------------------------- /1 - Setup/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/1 - Setup/public/logo512.png -------------------------------------------------------------------------------- /3 - Login/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/3 - Login/public/favicon.ico -------------------------------------------------------------------------------- /3 - Login/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/3 - Login/public/logo192.png -------------------------------------------------------------------------------- /3 - Login/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/3 - Login/public/logo512.png -------------------------------------------------------------------------------- /4 - Session/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/4 - Session/public/favicon.ico -------------------------------------------------------------------------------- /4 - Session/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/4 - Session/public/logo192.png -------------------------------------------------------------------------------- /4 - Session/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/4 - Session/public/logo512.png -------------------------------------------------------------------------------- /2 - Registration/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/2 - Registration/public/favicon.ico -------------------------------------------------------------------------------- /2 - Registration/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/2 - Registration/public/logo192.png -------------------------------------------------------------------------------- /2 - Registration/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imMayyur/aws-cognito-with-react/HEAD/2 - Registration/public/logo512.png -------------------------------------------------------------------------------- /1 - Setup/src/UserPool.js: -------------------------------------------------------------------------------- 1 | import { CognitoUserPool } from 'amazon-cognito-identity-js'; 2 | 3 | const poolData = { 4 | UserPoolId: 'Enter your Userpool ID', 5 | ClientId: 'Enter your Client ID', 6 | }; 7 | 8 | export default new CognitoUserPool(poolData); 9 | -------------------------------------------------------------------------------- /2 - Registration/src/UserPool.js: -------------------------------------------------------------------------------- 1 | import { CognitoUserPool } from 'amazon-cognito-identity-js'; 2 | 3 | const poolData = { 4 | UserPoolId: 'Enter your Userpool ID', 5 | ClientId: 'Enter your Client ID', 6 | }; 7 | 8 | export default new CognitoUserPool(poolData); 9 | -------------------------------------------------------------------------------- /3 - Login/src/UserPool.js: -------------------------------------------------------------------------------- 1 | import { CognitoUserPool } from 'amazon-cognito-identity-js'; 2 | 3 | const poolData = { 4 | UserPoolId: 'ap-south-1_L2XRAoUpd', 5 | ClientId: '6nc9su68hnoqqk8i96crsvlgc4', 6 | }; 7 | 8 | export default new CognitoUserPool(poolData); 9 | -------------------------------------------------------------------------------- /4 - Session/src/UserPool.js: -------------------------------------------------------------------------------- 1 | import { CognitoUserPool } from 'amazon-cognito-identity-js'; 2 | 3 | const poolData = { 4 | UserPoolId: 'ap-south-1_L2XRAoUpd', 5 | ClientId: '6nc9su68hnoqqk8i96crsvlgc4', 6 | }; 7 | 8 | export default new CognitoUserPool(poolData); 9 | -------------------------------------------------------------------------------- /1 - Setup/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /3 - Login/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /4 - Session/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /2 - Registration/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /1 - Setup/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /3 - Login/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /4 - Session/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /2 - Registration/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /2 - Registration/src/App.js: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Route, Routes } from 'react-router-dom'; 2 | import './App.css'; 3 | import Register from './Components/Register'; 4 | 5 | function App() { 6 | return ( 7 | 8 | 9 | } /> 10 | 11 | 12 | ); 13 | } 14 | 15 | export default App; 16 | -------------------------------------------------------------------------------- /1 - Setup/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /3 - Login/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /4 - Session/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /2 - Registration/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /1 - Setup/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /3 - Login/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /4 - Session/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /1 - Setup/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /2 - Registration/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /3 - Login/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /4 - Session/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /2 - Registration/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /3 - Login/src/App.js: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Route, Routes } from 'react-router-dom'; 2 | import './App.css'; 3 | import Login from './Components/Login'; 4 | import Register from './Components/Register'; 5 | 6 | function App() { 7 | return ( 8 | 9 | 10 | } /> 11 | } /> 12 | 13 | 14 | ); 15 | } 16 | 17 | export default App; 18 | -------------------------------------------------------------------------------- /1 - Setup/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /3 - Login/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /4 - Session/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /2 - Registration/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /1 - Setup/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /3 - Login/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /4 - Session/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /2 - Registration/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /1 - Setup/src/App.js: -------------------------------------------------------------------------------- 1 | import logo from './logo.svg'; 2 | import './App.css'; 3 | 4 | function App() { 5 | return ( 6 |
7 |
8 | logo 9 |

10 | Edit src/App.js and save to reload. 11 |

12 | 18 | Learn React 19 | 20 |
21 |
22 | ); 23 | } 24 | 25 | export default App; 26 | -------------------------------------------------------------------------------- /4 - Session/src/App.js: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Route, Routes } from 'react-router-dom'; 2 | import './App.css'; 3 | import { Account } from './Components/Account'; 4 | import Login from './Components/Login'; 5 | import Register from './Components/Register'; 6 | import Status from './Components/Status'; 7 | 8 | function App() { 9 | return ( 10 | 11 | 12 | 13 | 14 | } /> 15 | } /> 16 | } /> 17 | 18 | 19 | 20 | ); 21 | } 22 | 23 | export default App; 24 | -------------------------------------------------------------------------------- /1 - Setup/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /3 - Login/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /4 - Session/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /2 - Registration/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /4 - Session/src/Components/Status.js: -------------------------------------------------------------------------------- 1 | import { useContext, useEffect, useState } from 'react'; 2 | import { AccountContext } from './Account'; 3 | 4 | const Status = () => { 5 | const [status, setStatus] = useState(false); 6 | const { getSession, logout } = useContext(AccountContext); 7 | 8 | useEffect(() => { 9 | getSession() 10 | .then((session) => { 11 | console.log('Session: ', session); 12 | setStatus(true); 13 | }) 14 | .catch((err) => { 15 | console.log('Session: ', err); 16 | setStatus(false); 17 | }); 18 | }, [status]); 19 | 20 | return ( 21 |
22 | {status ? ( 23 |
24 | {' '} 25 | You are logged in. 26 | 27 |
28 | ) : ( 29 | 'Please Login' 30 | )} 31 |
32 | ); 33 | }; 34 | 35 | export default Status; 36 | -------------------------------------------------------------------------------- /1 - Setup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-cognito-with-react", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.11.4", 7 | "@testing-library/react": "^11.1.0", 8 | "@testing-library/user-event": "^12.1.10", 9 | "amazon-cognito-identity-js": "^5.2.3", 10 | "bootstrap": "^5.1.3", 11 | "react": "^17.0.2", 12 | "react-bootstrap": "^2.0.3", 13 | "react-dom": "^17.0.2", 14 | "react-router-dom": "^6.1.1", 15 | "react-scripts": "4.0.3", 16 | "web-vitals": "^1.0.1" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "eject": "react-scripts eject" 23 | }, 24 | "eslintConfig": { 25 | "extends": [ 26 | "react-app", 27 | "react-app/jest" 28 | ] 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /3 - Login/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-cognito-with-react", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.11.4", 7 | "@testing-library/react": "^11.1.0", 8 | "@testing-library/user-event": "^12.1.10", 9 | "amazon-cognito-identity-js": "^5.2.3", 10 | "bootstrap": "^5.1.3", 11 | "react": "^17.0.2", 12 | "react-bootstrap": "^2.0.3", 13 | "react-dom": "^17.0.2", 14 | "react-router-dom": "^6.1.1", 15 | "react-scripts": "4.0.3", 16 | "web-vitals": "^1.0.1" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "eject": "react-scripts eject" 23 | }, 24 | "eslintConfig": { 25 | "extends": [ 26 | "react-app", 27 | "react-app/jest" 28 | ] 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /4 - Session/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-cognito-with-react", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.11.4", 7 | "@testing-library/react": "^11.1.0", 8 | "@testing-library/user-event": "^12.1.10", 9 | "amazon-cognito-identity-js": "^5.2.3", 10 | "bootstrap": "^5.1.3", 11 | "react": "^17.0.2", 12 | "react-bootstrap": "^2.0.3", 13 | "react-dom": "^17.0.2", 14 | "react-router-dom": "^6.1.1", 15 | "react-scripts": "4.0.3", 16 | "web-vitals": "^1.0.1" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "eject": "react-scripts eject" 23 | }, 24 | "eslintConfig": { 25 | "extends": [ 26 | "react-app", 27 | "react-app/jest" 28 | ] 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /2 - Registration/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws-cognito-with-react", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.11.4", 7 | "@testing-library/react": "^11.1.0", 8 | "@testing-library/user-event": "^12.1.10", 9 | "amazon-cognito-identity-js": "^5.2.3", 10 | "bootstrap": "^5.1.3", 11 | "react": "^17.0.2", 12 | "react-bootstrap": "^2.0.3", 13 | "react-dom": "^17.0.2", 14 | "react-router-dom": "^6.1.1", 15 | "react-scripts": "4.0.3", 16 | "web-vitals": "^1.0.1" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "eject": "react-scripts eject" 23 | }, 24 | "eslintConfig": { 25 | "extends": [ 26 | "react-app", 27 | "react-app/jest" 28 | ] 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /4 - Session/src/Components/Login.js: -------------------------------------------------------------------------------- 1 | import { useContext, useState } from 'react'; 2 | import { AccountContext } from './Account'; 3 | 4 | function Login() { 5 | const [username, setUsername] = useState(''); 6 | const [password, setPassword] = useState(''); 7 | 8 | const { authenticate } = useContext(AccountContext); 9 | 10 | const onSubmit = (e) => { 11 | e.preventDefault(); 12 | authenticate(username, password) 13 | .then((data) => { 14 | console.log(data); 15 | alert('login success'); 16 | window.location.reload(); 17 | }) 18 | .catch((err) => { 19 | console.log(err); 20 | alert('login failure'); 21 | }); 22 | }; 23 | 24 | return ( 25 |
26 |
27 | Username: 28 | setUsername(e.target.value)} 32 | /> 33 |
34 | Password: 35 | setPassword(e.target.value)} 39 | /> 40 |
41 | 42 |
43 |
44 | ); 45 | } 46 | 47 | export default Login; 48 | -------------------------------------------------------------------------------- /3 - Login/src/Components/Login.js: -------------------------------------------------------------------------------- 1 | import { AuthenticationDetails, CognitoUser } from 'amazon-cognito-identity-js'; 2 | import { useState } from 'react'; 3 | import UserPool from '../UserPool'; 4 | 5 | function Login() { 6 | const [username, setUsername] = useState(''); 7 | const [email, setEmail] = useState(''); 8 | const [password, setPassword] = useState(''); 9 | 10 | const onSubmit = (e) => { 11 | e.preventDefault(); 12 | const user = new CognitoUser({ 13 | Username: username, 14 | Pool: UserPool, 15 | }); 16 | 17 | const authDetails = new AuthenticationDetails({ 18 | Username: username, 19 | Password: password, 20 | }); 21 | 22 | user.authenticateUser(authDetails, { 23 | onSuccess: (result) => { 24 | console.log('login success', result); 25 | }, 26 | onFailure: (err) => { 27 | console.log('login failure', err); 28 | }, 29 | newPasswordRequired: (data) => { 30 | console.log('new password required', data); 31 | }, 32 | }); 33 | }; 34 | 35 | return ( 36 |
37 |
38 | Email: 39 | setUsername(e.target.value)} 43 | /> 44 |
45 | Password: 46 | setPassword(e.target.value)} 50 | /> 51 |
52 | 53 |
54 |
55 | ); 56 | } 57 | 58 | export default Login; 59 | -------------------------------------------------------------------------------- /2 - Registration/src/Components/Register.js: -------------------------------------------------------------------------------- 1 | import { CognitoUserAttribute } from 'amazon-cognito-identity-js'; 2 | import { useState } from 'react'; 3 | import UserPool from '../UserPool'; 4 | 5 | function Register() { 6 | const [username, setUsername] = useState(''); 7 | const [email, setEmail] = useState(''); 8 | const [password, setPassword] = useState(''); 9 | 10 | const onSubmit = (e) => { 11 | e.preventDefault(); 12 | const attributeList = []; 13 | attributeList.push( 14 | new CognitoUserAttribute({ 15 | Name: 'email', 16 | Value: email, 17 | }) 18 | ); 19 | UserPool.signUp(username, password, attributeList, null, (err, data) => { 20 | if (err) { 21 | console.log(err); 22 | alert("Couldn't sign up"); 23 | } else { 24 | console.log(data); 25 | alert('User Added Successfully'); 26 | } 27 | }); 28 | }; 29 | 30 | return ( 31 |
32 |
33 | UserName: 34 | setUsername(e.target.value)} 38 | /> 39 |
40 | Email: 41 | setEmail(e.target.value)} 45 | /> 46 |
47 | Password: 48 | setPassword(e.target.value)} 52 | /> 53 |
54 | 55 |
56 |
57 | ); 58 | } 59 | 60 | export default Register; 61 | -------------------------------------------------------------------------------- /1 - Setup/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /3 - Login/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /4 - Session/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /2 - Registration/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /4 - Session/src/Components/Account.js: -------------------------------------------------------------------------------- 1 | import { AuthenticationDetails, CognitoUser } from 'amazon-cognito-identity-js'; 2 | import { createContext } from 'react'; 3 | import UserPool from '../UserPool'; 4 | 5 | const AccountContext = createContext(); 6 | 7 | const Account = (props) => { 8 | const getSession = async () => { 9 | await new Promise((resolve, reject) => { 10 | const user = UserPool.getCurrentUser(); 11 | if (user) { 12 | user.getSession((err, session) => { 13 | if (err) { 14 | reject(err); 15 | } else { 16 | resolve(session); 17 | } 18 | }); 19 | } else { 20 | reject(); 21 | } 22 | }); 23 | }; 24 | 25 | const authenticate = async (Username, Password) => { 26 | await new Promise((resolve, reject) => { 27 | const user = new CognitoUser({ 28 | Username, 29 | Pool: UserPool, 30 | }); 31 | 32 | const authDetails = new AuthenticationDetails({ 33 | Username, 34 | Password, 35 | }); 36 | 37 | user.authenticateUser(authDetails, { 38 | onSuccess: (result) => { 39 | console.log('login success', result); 40 | resolve(result); 41 | }, 42 | onFailure: (err) => { 43 | console.log('login failure', err); 44 | reject(err); 45 | }, 46 | newPasswordRequired: (data) => { 47 | console.log('new password required', data); 48 | resolve(data); 49 | }, 50 | }); 51 | }); 52 | }; 53 | 54 | const logout = () => { 55 | const user = UserPool.getCurrentUser(); 56 | user.signOut(); 57 | window.location.href = '/'; 58 | }; 59 | 60 | return ( 61 | 62 | {props.children} 63 | 64 | ); 65 | }; 66 | 67 | export { Account, AccountContext }; 68 | -------------------------------------------------------------------------------- /1 - Setup/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /3 - Login/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /4 - Session/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /2 - Registration/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /3 - Login/src/Components/Register.js: -------------------------------------------------------------------------------- 1 | import { CognitoUser, CognitoUserAttribute } from 'amazon-cognito-identity-js'; 2 | import { useState } from 'react'; 3 | import UserPool from '../UserPool'; 4 | 5 | function Register() { 6 | const [username, setUsername] = useState(''); 7 | const [email, setEmail] = useState(''); 8 | const [password, setPassword] = useState(''); 9 | const [verifyProcess, setVerifyProcess] = useState(false); 10 | const [OTP, setOTP] = useState(''); 11 | 12 | const onSubmit = (e) => { 13 | e.preventDefault(); 14 | const attributeList = []; 15 | attributeList.push( 16 | new CognitoUserAttribute({ 17 | Name: 'email', 18 | Value: email, 19 | }) 20 | ); 21 | UserPool.signUp(username, password, attributeList, null, (err, data) => { 22 | if (err) { 23 | console.log(err); 24 | alert("Couldn't sign up"); 25 | } else { 26 | console.log(data); 27 | setVerifyProcess(true); 28 | alert('User Added Successfully'); 29 | } 30 | }); 31 | }; 32 | 33 | const verifyAccount = (e) => { 34 | e.preventDefault(); 35 | const user = new CognitoUser({ 36 | Username: username, 37 | Pool: UserPool, 38 | }); 39 | console.log(user); 40 | user.confirmRegistration(OTP, true, (err, data) => { 41 | if (err) { 42 | console.log(err); 43 | alert("Couldn't verify account"); 44 | } else { 45 | console.log(data); 46 | alert('Account verified successfully'); 47 | window.location.href = '/login'; 48 | } 49 | }); 50 | }; 51 | 52 | return ( 53 |
54 | {verifyProcess == false ? ( 55 |
56 | UserName: 57 | setUsername(e.target.value)} 61 | /> 62 |
63 | Email: 64 | setEmail(e.target.value)} 68 | /> 69 |
70 | Password: 71 | setPassword(e.target.value)} 75 | /> 76 |
77 | 78 |
79 | ) : ( 80 |
81 | Enter the OTP: 82 | setOTP(e.target.value)} 86 | /> 87 |
88 | 89 |
90 | )} 91 |
92 | ); 93 | } 94 | 95 | export default Register; 96 | -------------------------------------------------------------------------------- /4 - Session/src/Components/Register.js: -------------------------------------------------------------------------------- 1 | import { CognitoUser, CognitoUserAttribute } from 'amazon-cognito-identity-js'; 2 | import { useState } from 'react'; 3 | import UserPool from '../UserPool'; 4 | 5 | function Register() { 6 | const [username, setUsername] = useState(''); 7 | const [email, setEmail] = useState(''); 8 | const [password, setPassword] = useState(''); 9 | const [verifyProcess, setVerifyProcess] = useState(false); 10 | const [OTP, setOTP] = useState(''); 11 | 12 | const onSubmit = (e) => { 13 | e.preventDefault(); 14 | const attributeList = []; 15 | attributeList.push( 16 | new CognitoUserAttribute({ 17 | Name: 'email', 18 | Value: email, 19 | }) 20 | ); 21 | UserPool.signUp(username, password, attributeList, null, (err, data) => { 22 | if (err) { 23 | console.log(err); 24 | alert("Couldn't sign up"); 25 | } else { 26 | console.log(data); 27 | setVerifyProcess(true); 28 | alert('User Added Successfully'); 29 | } 30 | }); 31 | }; 32 | 33 | const verifyAccount = (e) => { 34 | e.preventDefault(); 35 | const user = new CognitoUser({ 36 | Username: username, 37 | Pool: UserPool, 38 | }); 39 | console.log(user); 40 | user.confirmRegistration(OTP, true, (err, data) => { 41 | if (err) { 42 | console.log(err); 43 | alert("Couldn't verify account"); 44 | } else { 45 | console.log(data); 46 | alert('Account verified successfully'); 47 | window.location.href = '/login'; 48 | } 49 | }); 50 | }; 51 | 52 | return ( 53 |
54 | {verifyProcess === false ? ( 55 |
56 | UserName: 57 | setUsername(e.target.value)} 61 | /> 62 |
63 | Email: 64 | setEmail(e.target.value)} 68 | /> 69 |
70 | Password: 71 | setPassword(e.target.value)} 75 | /> 76 |
77 | 78 |
79 | ) : ( 80 |
81 | Enter the OTP: 82 | setOTP(e.target.value)} 86 | /> 87 |
88 | 89 |
90 | )} 91 |
92 | ); 93 | } 94 | 95 | export default Register; 96 | -------------------------------------------------------------------------------- /1 - Setup/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /3 - Login/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /4 - Session/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /2 - Registration/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | --------------------------------------------------------------------------------