From 52a329135ee586c3feb4cb8af0533f2e7f2a9572 Mon Sep 17 00:00:00 2001 From: Rogerio Chaves Date: Thu, 16 Apr 2020 22:16:23 +0200 Subject: [PATCH] Fix origin and add email login note to login page --- app/lib/express.js | 3 ++- app/views/email_sign_in.ejs | 2 +- app/views/keys.ejs | 7 ++++++- app/views/login.ejs | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/lib/express.js b/app/lib/express.js index 4f4c4bb..065a09f 100644 --- a/app/lib/express.js +++ b/app/lib/express.js @@ -223,9 +223,10 @@ router.get("/keys", (req, res) => { router.post("/keys/email", async (req, res) => { const email = req.body.email; + const origin = req.body.origin; let html = await ejs.renderFile("views/email_sign_in.ejs", { - host: `http://${req.headers.host}`, + origin, ssb_key: req.cookies["ssb_key"], }); diff --git a/app/views/email_sign_in.ejs b/app/views/email_sign_in.ejs index c5be8df..719bb03 100644 --- a/app/views/email_sign_in.ejs +++ b/app/views/email_sign_in.ejs @@ -1,7 +1,7 @@

Login button

Welcome to Social, please use the button below to login to your account:

-
+
diff --git a/app/views/keys.ejs b/app/views/keys.ejs index ed500c7..b239245 100644 --- a/app/views/keys.ejs +++ b/app/views/keys.ejs @@ -16,8 +16,13 @@
diff --git a/app/views/login.ejs b/app/views/login.ejs index 4236a66..b49ff04 100644 --- a/app/views/login.ejs +++ b/app/views/login.ejs @@ -3,6 +3,10 @@

Login

+

+ You should probably have received your login button by email, search for "Social login button", if not, then you must have saved your key, you can input it here +

+