Hi Andrei,
In general, please take these kinds of questions are better asked in
Stack Overflow. Will reply here for now but if you have more trouble, please post there.
Can you please include the steps to reproduce this error. I'm not sure if this is working as intended or a bug. For Identity Toolkit, we automatically work to link multiple authentication methods to the same user account. That means that if alice@gmail signs up for an app with a username/password on her desktop and then logs in via Google IDP on her phone, she ends up in the same account in the app. For security reasons, the user may be forced to confirm a previous authentication method in order to gain access to their account. That's what it looks like is happening in this case. I'm assuming the steps you went through are:
- Signed up with username/password
- Signed out
- Signed in with Twitter
- Asked for email address
-> Was asked to type in password
This kind of flow is likely to happen for Twitter and Facebook logins because neither of them is authoritative for the user's email address. We don't want to create a back door into the user's account in your app because their Twitter or Facebook account got hacked (if the user's gmail account gets hacked, it's game over anyway because attacker can use email recovery to gain access to your app).
I hope that helps. If you're experiencing something different, please provide steps to reproduce.