diff --git a/app/main/views/sign_in.py b/app/main/views/sign_in.py index f9873c656..618a35654 100644 --- a/app/main/views/sign_in.py +++ b/app/main/views/sign_in.py @@ -151,8 +151,6 @@ def sign_in(): return redirect(redirect_url) return redirect(url_for("main.show_accounts_or_dashboard")) - other_device = current_user.logged_in_elsewhere() - token = generate_token( str(request.remote_addr), current_app.config["SECRET_KEY"], @@ -166,7 +164,6 @@ def sign_in(): return render_template( "views/signin.html", again=bool(redirect_url), - other_device=other_device, initial_signin_url=url, ) diff --git a/app/models/user.py b/app/models/user.py index 3261dec01..932e754c8 100644 --- a/app/models/user.py +++ b/app/models/user.py @@ -140,11 +140,6 @@ class User(JSONModel, UserMixin): set_by_id=set_by_id, ) - def logged_in_elsewhere(self): - # This check is deprecated due to the transition to using login.gov. - return False - # return session.get("current_session_id") != self.current_session_id - def activate(self): if self.is_pending: user_data = user_api_client.activate_user(self.id) @@ -198,7 +193,7 @@ class User(JSONModel, UserMixin): @property def is_authenticated(self): - return not self.logged_in_elsewhere() and super(User, self).is_authenticated + return super(User, self).is_authenticated @property def platform_admin(self): @@ -676,10 +671,6 @@ class InvitedOrgUser(JSONModel): class AnonymousUser(AnonymousUserMixin): - # set the anonymous user so that if a new browser hits us we don't error http://stackoverflow.com/a/19275188 - - def logged_in_elsewhere(self): - return False @property def default_organization(self): diff --git a/tests/app/models/test_user.py b/tests/app/models/test_user.py index 8c4c26907..1caf85f4a 100644 --- a/tests/app/models/test_user.py +++ b/tests/app/models/test_user.py @@ -6,7 +6,6 @@ from tests.conftest import SERVICE_ONE_ID, USER_ONE_ID def test_anonymous_user(notify_admin): assert AnonymousUser().is_authenticated is False - assert AnonymousUser().logged_in_elsewhere() is False assert AnonymousUser().default_organization.name is None assert AnonymousUser().default_organization.domains == [] assert AnonymousUser().default_organization.organization_type is None