Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
marcingy CreditAttribution: marcingy as a volunteer commentedThis would be optional as ineffect this would be an API change in terms of the response.
Comment #3
asit CreditAttribution: asit commentedYes. 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.
Comment #4
TheWrench CreditAttribution: TheWrench commented+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!