'use strict';
const { TemplateHelper: th } = require('@squeep/html-template-helper');
+const { sessionNavLinks } = require('./helpers');
/**
*
* @param {String} options.manager.pageTitle
* @param {Object} options.dingus
* @param {String} options.dingus.selfBaseUrl
+ * @param {(pagePathLevel, ctx, htmlOptions) => {void}} appCb
* @returns {String}
*/
-module.exports = (ctx, options) => {
+module.exports = (ctx, options, appCb = () => {}) => {
+ const pagePathLevel = 1;
const htmlOptions = {
+ pageIdentifier: 'indieAuthError',
pageTitle: options.manager.pageTitle,
logoUrl: options.manager.logoUrl,
footerEntries: options.manager.footerEntries,
'<p>Problems were encountered while trying to authenticate your profile URL.</p>',
],
};
+ appCb(pagePathLevel, ctx, htmlOptions);
+ sessionNavLinks(pagePathLevel, ctx, htmlOptions);
+
// Ensure there is always an error to report, even if we do not have one, as we ended up here somehow.
if (!ctx?.errors?.length) {
ctx.errors = [
'Unknown Error — we are not sure what just happened',
];
}
- return th.htmlPage(2, ctx, htmlOptions, mainContent());
+ return th.htmlPage(pagePathLevel, ctx, htmlOptions, mainContent());
};
\ No newline at end of file