diff --git a/1-Authentication/1-sign-in/.gitignore b/1-Authentication/1-sign-in/.gitignore new file mode 100644 index 0000000..a586f22 --- /dev/null +++ b/1-Authentication/1-sign-in/.gitignore @@ -0,0 +1,8 @@ +# Node +node_modules/ + +# Cypress +cypress/screenshots/ + +# Environments +cypress.env.json \ No newline at end of file diff --git a/1-Authentication/1-sign-in/App/authConfig.js b/1-Authentication/1-sign-in/App/authConfig.js index 7b37a44..a96f098 100644 --- a/1-Authentication/1-sign-in/App/authConfig.js +++ b/1-Authentication/1-sign-in/App/authConfig.js @@ -6,8 +6,8 @@ const msalConfig = { auth: { - clientId: 'Enter_the_Application_Id_Here', // This is the ONLY mandatory field that you need to supply. - authority: 'https://login.microsoftonline.com/Enter_the_Tenant_Info_Here', // Defaults to "https://login.microsoftonline.com/common" + clientId: '8a3f1e7b-284f-48a4-85d0-60fc62280148', // Enter_the_Application_Id_Here - This is the ONLY mandatory field that you need to supply. + authority: 'https://login.microsoftonline.com/5db860bd-0c26-4a06-9834-7fe6c8d30cf1', // Enter_the_Tenant_Info_Here - Defaults to "https://login.microsoftonline.com/common" redirectUri: '/', // You must register this URI on Azure Portal/App Registration. Defaults to window.location.href e.g. http://localhost:3000/ navigateToLoginRequestUrl: true, // If "true", will navigate back to the original request location before processing the auth code response. }, @@ -55,10 +55,10 @@ const loginRequest = { * between applications by providing a "login_hint" property. */ -// const silentRequest = { -// scopes: ["openid", "profile"], -// loginHint: "example@domain.net" -// }; + const silentRequest = { + scopes: ["openid", "profile"], + loginHint: "hernandeez00@hotmail.com" + }; // exporting config object for jest if (typeof exports !== 'undefined') { diff --git a/1-Authentication/1-sign-in/App/index.html b/1-Authentication/1-sign-in/App/index.html index c8ceb23..65bcaf5 100644 --- a/1-Authentication/1-sign-in/App/index.html +++ b/1-Authentication/1-sign-in/App/index.html @@ -9,13 +9,12 @@ - + - - + + @@ -48,22 +47,26 @@
head over to the jwt.ms

- + - - + + + + + - + + - + \ No newline at end of file diff --git a/1-Authentication/1-sign-in/server.js b/1-Authentication/1-sign-in/server.js index aa234a1..dcbe840 100644 --- a/1-Authentication/1-sign-in/server.js +++ b/1-Authentication/1-sign-in/server.js @@ -19,14 +19,14 @@ const app = express(); */ const limiter = rateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes - max: 100, // Limit each IP to 100 requests per `window` (here, per 15 minutes) + max: 1000000, // Limit each IP to 100 requests per `window` (here, per 15 minutes) standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers legacyHeaders: false, // Disable the `X-RateLimit-*` headers }); // Apply the rate limiting middleware to all requests -app.use(limiter); +//app.use(limiter); // Configure morgan module to log all requests.