Skip to content

Login as multiple auth-enabled collections #226

Answered by jmikrut
sixers asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @sixers!

Unfortunately there are many complexities below the surface of doing something like this.

For example, if you were logged in as 2 different users, how would Payload know which user you were intending to be using for any given request? Payload operations access the currently authenticated user from req.user - and while it would be easy enough to change this pattern to use req.users or similar instead, we would still need to know which user to rely on.

Making auth cookie names dynamic would certainly be one piece of the puzzle, but there are many more complex issues and use cases that would need to be thought through fully here.

We can keep it on the radar for sure though. What…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sixers
Comment options

Answer selected by zubricks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants