X-Git-Url: https://git.squeep.com/?p=squeep-authentication-module;a=blobdiff_plain;f=lib%2Ftemplate%2Fotp-html.js;fp=lib%2Ftemplate%2Fotp-html.js;h=389f68670964b4a4b6fbb9daa45246fa4168d42a;hp=066acce57ac308da62d4988c3cf3c4bc62f4e726;hb=2c3ddf0a6f40b9d0a4e54fa12b84b8af33eaaadc;hpb=54ca04e330d14a12344ddc2b161c1d9b55bfd7d7 diff --git a/lib/template/otp-html.js b/lib/template/otp-html.js index 066acce..389f686 100644 --- a/lib/template/otp-html.js +++ b/lib/template/otp-html.js @@ -1,6 +1,7 @@ 'use strict'; const { TemplateHelper: th } = require('@squeep/html-template-helper'); +const { sessionNavLinks } = require('./helpers'); /** * Login form, continued. @@ -37,18 +38,23 @@ ${otpBlurb} * @param {String=} options.manager.logoUrl * @param {Object} options.dingus * @param {String} options.dingus.selfBaseUrl + * @param {() => {}} appCb * @returns {String} */ -module.exports = (ctx, options) => { +module.exports = (ctx, options, appCb = () => {}) => { + const pagePathLevel = 1; const htmlOptions = { + pageIdentifier: 'otp', pageTitle: options.manager.pageTitle, logoUrl: options.manager.logoUrl, footerEntries: options.manager.footerEntries, otpBlurb: options.authenticator?.otpBlurb, }; + appCb(pagePathLevel, ctx, htmlOptions); + sessionNavLinks(pagePathLevel, ctx, htmlOptions); const mainContent = [ ...(options.authenticator?.loginBlurb || []), otpSection(ctx, htmlOptions), ]; - return th.htmlPage(2, ctx, htmlOptions, mainContent); + return th.htmlPage(pagePathLevel, ctx, htmlOptions, mainContent); }; \ No newline at end of file