Skip to content

Logged-in users should be redirected from /auth/login to home #185

@stultus

Description

@stultus

Problem

Visiting /auth/login while already authenticated still renders the login form instead of redirecting the user away. This is confusing and lets users re-submit credentials for no reason.

Expected behavior

If the current user is already authenticated, /auth/login should redirect to the home page (search.index).

Suggested fix

At the top of the login view in app/auth/controllers.py, check current_user.is_authenticated and redirect to url_for('search.index') before rendering the form.

The same check should probably apply to /auth/signup for consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions