Hi @dmitry
This is an odd use case. I do not recommend any approach like what you are asking.
Giving a user A access to user B’s account with asking for credentials is a huge security risk. You may be able to come up with a solution/protocol that achieves this, but you should have an in-depth security review.
If user A and user B are truly the same user, you can link the two accounts, but this isn’t quite what you are asking.
I’d suggest reviewing your architecture to come up with an approach that is more easy to secure.
John