If the user is already logged in, login API returns "Already logged in as @user" with status code 406. Instead it should return the currently logged in user details along with session info and token value.

Comments

asit created an issue.

marcingy’s picture

This would be optional as ineffect this would be an API change in terms of the response.

asit’s picture

Yes. This will be an API change. But sending non 200 status will confuse the user. We can also think of giving a flexibility to developers to extend this function, probably via a hook.

TheWrench’s picture

+1

I would love for a way to handle this better. If anyone has any suggestions to change this behavior, I would greatly appreciate it!

Thanks!