PerlDancer / PerlDancer/Dancer2-Plugin-Auth-Extensible

Behaviour for login when already logged in is poor

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
10
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Code here in post /login route:

https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible/blob/37f3fa92e18c6e8a89908aa0ea2adca95fc24a8d/lib/Dancer2/Plugin/Auth/Extensible.pm#L1057-L1060

    if ( $plugin->logged_in_user ) {
        $app->redirect( $app->request->params->{return_url}
              || $plugin->user_home_page );
    }

So if user1 is logged and then user2 tries to login then user1 stays logged in and user gets redirected. I think we should produce some kind of error at the least.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the POST /login route in lib/Dancer2/Plugin/Auth/Extensible.pm around lines 1057-1060 and trace the existing logged-in-user redirect behavior. Reproduce a second login while user1 is logged in, then define and verify explicit handling so the attempt no longer silently redirects while user1 remains logged in.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.