Search code examples
djangodjango-allauth

Django allauth: Visit login page but already logged in


Can you set django-allauth to have a redirect link if you visit the login page and you're already logged in?


Solution

  • I have also encountered this recently. You can add LOGIN_REDIRECT_URL = 'some redirect url' to your settings.py file. All-auth will use this as the redirect URL for when you log in, and if you visit the login page after logging in.