aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/authentication')
-rw-r--r--src/server/authentication/AuthenticationManager.ts17
-rw-r--r--src/server/authentication/DashUserModel.ts8
2 files changed, 17 insertions, 8 deletions
diff --git a/src/server/authentication/AuthenticationManager.ts b/src/server/authentication/AuthenticationManager.ts
index 00f1fe44e..3fbd4b3a7 100644
--- a/src/server/authentication/AuthenticationManager.ts
+++ b/src/server/authentication/AuthenticationManager.ts
@@ -47,7 +47,10 @@ export let postSignup = (req: Request, res: Response, next: NextFunction) => {
const model = {
email,
password,
- userDocumentId: Utils.GenerateGuid()
+ userDocumentId: Utils.GenerateGuid(),
+ sharingDocumentId: Utils.GenerateGuid(),
+ linkDatabaseId: Utils.GenerateGuid(),
+ cacheDocumentIds: ""
} as Partial<DashUserModel>;
const user = new User(model);
@@ -174,13 +177,13 @@ export let postForgot = function (req: Request, res: Response, next: NextFunctio
const smtpTransport = nodemailer.createTransport({
service: 'Gmail',
auth: {
- user: 'brownptcdash@gmail.com',
- pass: 'browngfx1'
+ user: 'browndashptc@gmail.com',
+ pass: 'TsarNicholas#2'
}
});
const mailOptions = {
to: user.email,
- from: 'brownptcdash@gmail.com',
+ from: 'browndashptc@gmail.com',
subject: 'Dash Password Reset',
text: 'You are receiving this because you (or someone else) have requested the reset of the password for your account.\n\n' +
'Please click on the following link, or paste this into your browser to complete the process:\n\n' +
@@ -247,13 +250,13 @@ export let postReset = function (req: Request, res: Response) {
const smtpTransport = nodemailer.createTransport({
service: 'Gmail',
auth: {
- user: 'brownptcdash@gmail.com',
- pass: 'browngfx1'
+ user: 'browndashptc@gmail.com',
+ pass: 'TsarNicholas#2'
}
});
const mailOptions = {
to: user.email,
- from: 'brownptcdash@gmail.com',
+ from: 'browndashptc@gmail.com',
subject: 'Your password has been changed',
text: 'Hello,\n\n' +
'This is a confirmation that the password for your account ' + user.email + ' has just been changed.\n'
diff --git a/src/server/authentication/DashUserModel.ts b/src/server/authentication/DashUserModel.ts
index 51d920a8f..bee28b96d 100644
--- a/src/server/authentication/DashUserModel.ts
+++ b/src/server/authentication/DashUserModel.ts
@@ -10,6 +10,9 @@ export type DashUserModel = mongoose.Document & {
passwordResetExpires?: Date,
userDocumentId: string;
+ sharingDocumentId: string;
+ linkDatabaseId: string;
+ cacheDocumentIds: string;
profile: {
name: string,
@@ -35,7 +38,10 @@ const userSchema = new mongoose.Schema({
passwordResetToken: String,
passwordResetExpires: Date,
- userDocumentId: String,
+ userDocumentId: String, // id that identifies a document which hosts all of a user's account data
+ sharingDocumentId: String, // id that identifies a document that stores documents shared to a user, their user color, and any additional info needed to communicate between users
+ linkDatabaseId: String,
+ cacheDocumentIds: String, // set of document ids to retreive on startup
facebook: String,
twitter: String,