From 3224334de3d2f510c874d72f8a8d827c345017b8 Mon Sep 17 00:00:00 2001 From: Fellyph Cintra Date: Tue, 16 Jan 2024 19:47:47 +0000 Subject: [PATCH 1/7] adding env example file --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index 65a1595..2a2a258 100644 --- a/.env.example +++ b/.env.example @@ -6,3 +6,4 @@ domain-b-background=bg-blue-100 domain-c=localhost # domain-ccc.com domain-c-background=bg-red-100 port=8080 # port to listen on +google-client-id= # google client id From 64705303cc0c87a52bb1adca7c9a450cb985e50e Mon Sep 17 00:00:00 2001 From: Fellyph Cintra Date: Tue, 16 Jan 2024 19:48:19 +0000 Subject: [PATCH 2/7] loading new variable for google id --- app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.js b/app.js index 1bf41ee..c3710b4 100644 --- a/app.js +++ b/app.js @@ -33,6 +33,7 @@ app.use((req, res, next) => { res.locals.domainA = process.env['domain-a']; res.locals.domainB = process.env['domain-b']; res.locals.domainC = process.env['domain-c']; + res.locals.googleClientId = process.env['google-client-id']; res.locals.port = process.env.port; res.locals.isPortPresent = req.get('host').includes(':'); res.locals.currentDomain = req.get( 'host' ); @@ -66,6 +67,7 @@ const scenarios = [ 'analytics', 'embedded-video', 'payment-gateway', + 'gsi' ]; scenarios.forEach(scenario => { const scenarioRoutes = require(`./src/scenarios/${scenario}/routes`); From 1cd4482379159ecdf855dcf625650547983e17d8 Mon Sep 17 00:00:00 2001 From: Fellyph Cintra Date: Tue, 16 Jan 2024 19:48:42 +0000 Subject: [PATCH 3/7] updating style --- public/assets/styles/style.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/public/assets/styles/style.css b/public/assets/styles/style.css index 8d21911..6c2bdd8 100644 --- a/public/assets/styles/style.css +++ b/public/assets/styles/style.css @@ -647,6 +647,10 @@ video { display: grid; } +.hidden { + display: none; +} + .h-24 { height: 6rem; } @@ -757,6 +761,11 @@ video { border-width: 8px; } +.bg-blue-100 { + --tw-bg-opacity: 1; + background-color: rgb(219 234 254 / var(--tw-bg-opacity)); +} + .bg-blue-500 { --tw-bg-opacity: 1; background-color: rgb(59 130 246 / var(--tw-bg-opacity)); @@ -767,10 +776,25 @@ video { background-color: rgb(243 244 246 / var(--tw-bg-opacity)); } +.bg-green-100 { + --tw-bg-opacity: 1; + background-color: rgb(220 252 231 / var(--tw-bg-opacity)); +} + .bg-inherit { background-color: inherit; } +.bg-red-100 { + --tw-bg-opacity: 1; + background-color: rgb(254 226 226 / var(--tw-bg-opacity)); +} + +.bg-sky-50 { + --tw-bg-opacity: 1; + background-color: rgb(240 249 255 / var(--tw-bg-opacity)); +} + .bg-white { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); From 0e068fa2226187d5e7efb4e568552ccab95d5179 Mon Sep 17 00:00:00 2001 From: Fellyph Cintra Date: Tue, 16 Jan 2024 19:51:22 +0000 Subject: [PATCH 4/7] adding client id on the header --- src/common/header.ejs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/header.ejs b/src/common/header.ejs index 9e0fcf1..e8165f3 100644 --- a/src/common/header.ejs +++ b/src/common/header.ejs @@ -7,6 +7,7 @@ + From 3b83d3567d94a6fc888a582ff39d5ba8f0701cf0 Mon Sep 17 00:00:00 2001 From: Fellyph Cintra Date: Tue, 16 Jan 2024 19:51:45 +0000 Subject: [PATCH 5/7] adding link to gsi demo --- src/common/index.ejs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/index.ejs b/src/common/index.ejs index 14a3bc7..fe4bda6 100644 --- a/src/common/index.ejs +++ b/src/common/index.ejs @@ -28,6 +28,10 @@ class="block p-4 bg-white shadow rounded hover:bg-blue-500 hover:text-white transition duration-300"> 💳 Payment Gateway + + 🔐 Legacy GSI +

API Demos

From 0fbf1d6ca0afc967e0d50ba91eec69e49f52e663 Mon Sep 17 00:00:00 2001 From: Fellyph Cintra Date: Tue, 16 Jan 2024 19:53:41 +0000 Subject: [PATCH 6/7] adding GSI demo page --- src/scenarios/gsi/index.ejs | 31 +++++++++++++++++++++++++++++++ src/scenarios/gsi/routes.js | 12 ++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/scenarios/gsi/index.ejs create mode 100644 src/scenarios/gsi/routes.js diff --git a/src/scenarios/gsi/index.ejs b/src/scenarios/gsi/index.ejs new file mode 100644 index 0000000..6eee39c --- /dev/null +++ b/src/scenarios/gsi/index.ejs @@ -0,0 +1,31 @@ +<%- include(commonPath + '/header.ejs') %> + +
+

Legacy Google Sign-in

+

Please login to test this demo.

+
+
+ +
+
+
+ + + +<%- include(commonPath + '/footer.ejs') %> diff --git a/src/scenarios/gsi/routes.js b/src/scenarios/gsi/routes.js new file mode 100644 index 0000000..4de5222 --- /dev/null +++ b/src/scenarios/gsi/routes.js @@ -0,0 +1,12 @@ +const express = require('express'); +const path = require('path'); +const router = express.Router(); + +router.get('/', (req, res) => { + // Send the default page + res.render(path.join(__dirname,'index'), { + title: 'Legacy GSI Demo' + }); +}); + +module.exports = router; From 8e52e6f104e21961b62c297d84aee0e263771655 Mon Sep 17 00:00:00 2001 From: Fellyph Cintra Date: Wed, 17 Jan 2024 13:39:01 +0000 Subject: [PATCH 7/7] removing the word demo from the title --- src/scenarios/gsi/routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenarios/gsi/routes.js b/src/scenarios/gsi/routes.js index 4de5222..bb9b195 100644 --- a/src/scenarios/gsi/routes.js +++ b/src/scenarios/gsi/routes.js @@ -5,7 +5,7 @@ const router = express.Router(); router.get('/', (req, res) => { // Send the default page res.render(path.join(__dirname,'index'), { - title: 'Legacy GSI Demo' + title: 'Legacy GSI' }); });