Compare commits

..

5 Commits

Author SHA1 Message Date
Kayne Ruse 353be4662b Bumped version number 2021-12-19 16:07:44 +00:00
Kayne Ruse cc655cd988 Merge remote-tracking branch 'refs/remotes/origin/main' 2021-12-19 16:06:30 +00:00
Kayne Ruse ec3b14e32b Removed excess logging 2021-12-19 16:06:23 +00:00
Kayne Ruse b188c46efd Merge pull request #9 from MatthewEvans91/remove-address-line
omit physical address line from validation email where no physical address provided
2021-12-20 03:04:03 +11:00
Matthew Evans ece3b0253f omit physical address line from validation email where no physical address provided 2021-12-18 18:47:44 -07:00
4 changed files with 10 additions and 17 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "auth-server",
"version": "1.4.8",
"version": "1.4.9",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "auth-server",
"version": "1.4.8",
"version": "1.4.9",
"license": "ISC",
"dependencies": {
"bcryptjs": "^2.4.3",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "auth-server",
"version": "1.4.8",
"version": "1.4.9",
"description": "An API centric auth server. Uses Sequelize and mariaDB by default.",
"main": "server/server.js",
"scripts": {
+6 -9
View File
@@ -52,9 +52,6 @@ const validateDetails = async (body) => {
return 'Invalid username';
}
//check for existing (banned)
//TODO: re-add banned email checks
//check for existing email
const emailRecord = await accounts.findOne({
where: {
@@ -107,12 +104,12 @@ const registerPendingSignup = async (body, hash, token) => {
const sendValidationEmail = async (email, username, token) => {
const addr = `${process.env.WEB_PROTOCOL}://${process.env.WEB_ADDRESS}/auth/validation?username=${username}&token=${token}`;
const msg = `Hello ${username}!
Please visit the following link to validate your account: ${addr}
You can contact us directly at our physical mailing address here: ${process.env.MAIL_PHYSICAL}
`;
const msg =
`Hello ${username}!\n\n` +
`Please visit the following link to validate your account: ${addr}\n` +
(process.env.MAIL_PHYSICAL
? `\nYou can contact us directly at our physical mailing address here: ${process.env.MAIL_PHYSICAL}\n`
: ``);
let transporter, info;
+1 -5
View File
@@ -30,7 +30,7 @@ const route = async (req, res) => {
//delete the pending signup
pendingSignups.destroy({
where: {
username: req.query.username || ''
username: info.username || ''
}
});
@@ -43,13 +43,9 @@ const route = async (req, res) => {
if (!probe.ok) {
console.error('Could not probe the post validation hook');
} else {
console.log('Validation hook probe successful'); //TODO: remove this
}
//discard the result
} else {
console.log('No validation hook'); //TODO: remove this
}
};