diff --git a/docs/images/forgot_password.png b/docs/images/forgot_password.png
index ea53fc1a0..b562e5eaf 100644
Binary files a/docs/images/forgot_password.png and b/docs/images/forgot_password.png differ
diff --git a/docs/images/login.png b/docs/images/login.png
index cd0cb7b56..ba1d59461 100644
Binary files a/docs/images/login.png and b/docs/images/login.png differ
diff --git a/docs/usage/authentication.rst b/docs/usage/authentication.rst
index 044c68562..b3059cffd 100644
--- a/docs/usage/authentication.rst
+++ b/docs/usage/authentication.rst
@@ -44,7 +44,7 @@ In case user forgets his password, he can follow the steps shown below to reset
.. figure:: /images/forgot_password.png
:align: center
- Provide the email of the account for which you want to reset password
+ Provide the username/email of the account for which you want to reset password
.. figure:: /images/otp_sent.png
:align: center
diff --git a/owtf/api/handlers/auth.py b/owtf/api/handlers/auth.py
index e82c90c21..2144e3428 100644
--- a/owtf/api/handlers/auth.py
+++ b/owtf/api/handlers/auth.py
@@ -464,7 +464,7 @@ def post(self):
response = {"status": "success", "message": "Otp Send Successful"}
self.success(response)
else:
- err = {"status": "fail", "message": "Email/Username doesn't exist"}
+ err = {"status": "fail", "message": "Username / Email doesn't exist"}
self.success(err)
@@ -510,7 +510,7 @@ def post(self):
else:
self.success({"status": "fail", "message": "Invalid OTP"})
else:
- err = {"status": "fail", "message": "Email doesn't exist"}
+ err = {"status": "fail", "message": "Username / Email doesn't exist"}
self.success(err)
diff --git a/owtf/api/handlers/config.py b/owtf/api/handlers/config.py
index 4df8017e5..724a6ac08 100644
--- a/owtf/api/handlers/config.py
+++ b/owtf/api/handlers/config.py
@@ -7,12 +7,10 @@
from owtf.lib import exceptions
from owtf.lib.exceptions import APIError
from owtf.managers.config import get_all_config_dicts, update_config_val
-from owtf.api.handlers.jwtauth import jwtauth
__all__ = ["ConfigurationHandler"]
-@jwtauth
class ConfigurationHandler(APIRequestHandler):
"""Update framework settings and tool paths."""
diff --git a/owtf/models/user.py b/owtf/models/user.py
index 4bc061725..a5e3d858e 100644
--- a/owtf/models/user.py
+++ b/owtf/models/user.py
@@ -5,6 +5,7 @@
"""
from sqlalchemy import Column, Integer, Unicode, Boolean
from owtf.db.model_base import Model
+from owtf.models.email_confirmation import EmailConfirmation
from sqlalchemy.orm import relationship
import uuid
@@ -18,7 +19,7 @@ class User(Model):
password = Column(Unicode(255), nullable=False)
is_active = Column(Boolean, default=False) # checks whether user email is verified
otp_secret_key = Column(Unicode(255), nullable=False, unique=True) # used to generate unique otp
- email_confirmations = relationship("EmailConfirmation", cascade="delete")
+ email_confirmations = relationship(EmailConfirmation, cascade="delete")
user_login_tokens = relationship("UserLoginToken", cascade="delete")
@classmethod
diff --git a/owtf/models/user_login_token.py b/owtf/models/user_login_token.py
index ba53940dd..d441856ec 100644
--- a/owtf/models/user_login_token.py
+++ b/owtf/models/user_login_token.py
@@ -3,18 +3,19 @@
~~~~~~~~~~~~~~~~
"""
-from sqlalchemy import Column, Integer, String, ForeignKey, DateTime
+from sqlalchemy import Column, Integer, String, ForeignKey, DateTime, UniqueConstraint
from owtf.db.model_base import Model
import uuid
from datetime import datetime, timedelta
from owtf.settings import JWT_EXP_DELTA_SECONDS
+from owtf.models.user import User
class UserLoginToken(Model):
__tablename__ = "user_login_tokens"
id = Column(Integer, primary_key=True, autoincrement=True)
- user_id = Column(Integer, ForeignKey("users.id"))
+ user_id = Column(Integer, ForeignKey(User.id))
token = Column(String, nullable=False)
@classmethod
diff --git a/owtf/webapp/src/containers/App/index.js b/owtf/webapp/src/containers/App/index.js
index b8f2c12cc..c974b7916 100644
--- a/owtf/webapp/src/containers/App/index.js
+++ b/owtf/webapp/src/containers/App/index.js
@@ -83,11 +83,7 @@ export class App extends React.Component {
component={Dashboard}
authenticated={this.props.isAuthenticated}
/>
-
+