@opengis/fastify-table 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -29,7 +29,7 @@ export default async function loginTemplate(req, reply) {
|
|
|
29
29
|
if (!userExists && config.pg) {
|
|
30
30
|
return reply.status(400).send("user not found in db");
|
|
31
31
|
}
|
|
32
|
-
const twoFactorPagePath = path.join(dirname, "
|
|
32
|
+
const twoFactorPagePath = path.join(dirname, "../../../../../server/templates/page/2factor.html");
|
|
33
33
|
const customBody = await getTemplate("page", "2factor");
|
|
34
34
|
const body = customBody || (await readFile(twoFactorPagePath, "utf8"));
|
|
35
35
|
const { enabled, secret } = config.pg
|
|
@@ -44,7 +44,7 @@ export default async function loginTemplate(req, reply) {
|
|
|
44
44
|
/* -- access recovery start */
|
|
45
45
|
// user already authorized via euSign / social / login
|
|
46
46
|
if (uid && !req.session?.secondFactorPassed && req.query?.recovery) {
|
|
47
|
-
const defaultPagePath = path.join(dirname, "
|
|
47
|
+
const defaultPagePath = path.join(dirname, "../../../../../server/templates/page/2factor-recovery.html");
|
|
48
48
|
const customBodyRecovery = await getTemplate("page", "2factor-recovery");
|
|
49
49
|
const bodyRecovery = customBodyRecovery || (await readFile(defaultPagePath, "utf8"));
|
|
50
50
|
const html = await handlebars.compile(bodyRecovery)({
|
|
@@ -13,7 +13,7 @@ const headers = {
|
|
|
13
13
|
export default async function loginTemplate(req, reply) {
|
|
14
14
|
const body = await getTemplate("page", "loginEuSign");
|
|
15
15
|
if (!body) {
|
|
16
|
-
const defaultBody = await readFile(path.join(dirname, "
|
|
16
|
+
const defaultBody = await readFile(path.join(dirname, "../../../../templates/page/loginEuSign.html"), "utf8");
|
|
17
17
|
return reply.headers(headers).send(defaultBody);
|
|
18
18
|
}
|
|
19
19
|
return reply.headers(headers).send(body);
|
|
@@ -26,7 +26,7 @@ export default async function loginTemplate(req, reply) {
|
|
|
26
26
|
return p;
|
|
27
27
|
}, {});
|
|
28
28
|
if (!body) {
|
|
29
|
-
const defaultBody = await readFile(path.join(dirname, "
|
|
29
|
+
const defaultBody = await readFile(path.join(dirname, "../../../../templates/page/login.html"), "utf8");
|
|
30
30
|
const html = await handlebars.compile(defaultBody)({
|
|
31
31
|
settings,
|
|
32
32
|
req,
|