feat: Add OIDC debug mode

This commit is contained in:
Maksim Eltyshev
2026-01-27 22:34:08 +01:00
parent 2c4369159b
commit d688a64e36
52 changed files with 349 additions and 24 deletions
+4 -5
View File
@@ -61,9 +61,8 @@ module.exports = {
return Errors.NOT_AVAILABLE;
}
const logs = [];
const logs = ['📧 Sending test email...'];
try {
logs.push('📧 Sending test email...');
/* eslint-disable no-underscore-dangle */
const info = await transporter.sendMail({
to: currentUser.email,
@@ -72,16 +71,16 @@ module.exports = {
html: this.req.i18n.__('This is a <i>test</i> <b>html</b> <code>message</code>!'),
});
/* eslint-enable no-underscore-dangle */
logs.push('✅ Email sent successfully!', '');
logs.push('✅ Email sent successfully.', '');
logs.push(`📬 Message ID: ${info.messageId}`);
if (info.response) {
logs.push(`📤 Server response: ${info.response.trim()}`);
}
logs.push('', '🎉 Your configuration is working correctly!');
logs.push('', '🎉 Your configuration is working correctly.');
} catch (error) {
logs.push('❌ Failed to send email!', '');
logs.push('❌ Failed to send email.', '');
if (error.code) {
logs.push(`⚠️ Error code: ${error.code}`);