diff --git a/setupdb.sh b/setupdb.sh index 084d823..bcd69a2 100644 --- a/setupdb.sh +++ b/setupdb.sh @@ -57,6 +57,13 @@ sudo -u postgres psql -c "CREATE TABLE cryptoWallets( ); " cavecomm +sudo -u postgres psql -c "CREATE TABLE passwordResetKeys( + freelancerEmail text PRIMARY KEY, + passwordResetKey text UNIQUE, + expiration timestamp + ); +" cavecomm + sudo -u postgres psql -c "CREATE TABLE aliasRoutes( aliasName text PRIMARY KEY, freelancerID int, diff --git a/spec/spec.md b/spec/spec.md index 3282c04..15fc1ad 100644 --- a/spec/spec.md +++ b/spec/spec.md @@ -152,6 +152,14 @@ email + password clears secure cookie and removes session from DB +++ "/freelancer/signup" creates user using a name, email and password while creating a salted hash of the password +++++ "/freelancer/login/passwordreset" +Freelancer can request a reset email to be sent to an email + +passwordResetKeys +freelancerEmail text +passwordResetKey text +expiration timestamp - the time at which the resetkey is unusable. + ### "/freelancer/profile" Profile page collating freelancer pages. @@ -235,6 +243,7 @@ mandatory: databaseConnectionString={postgresql://{user}:{password}@{host}:{port}/{database}} sslCrtPath sslKeyPath + domain optional:{default} diff --git a/templates/passwordReset.html b/templates/passwordReset.html new file mode 100644 index 0000000..17ad011 --- /dev/null +++ b/templates/passwordReset.html @@ -0,0 +1,20 @@ + + +
+ {{> templateIncludes/style.css.html}} + + +