diff --git a/dojo/user/views.py b/dojo/user/views.py index f021aa00460..9a7e2da040c 100644 --- a/dojo/user/views.py +++ b/dojo/user/views.py @@ -108,6 +108,8 @@ def api_v2_key(request): @dojo_ratelimit(key='post:username') @dojo_ratelimit(key='post:password') def login_view(request): + if request.user.is_authenticated: + return HttpResponseRedirect(reverse('home')) if not settings.SHOW_LOGIN_FORM and settings.SOCIAL_LOGIN_AUTO_REDIRECT and sum([ settings.GOOGLE_OAUTH_ENABLED, settings.OKTA_OAUTH_ENABLED,