What you're looking for is called account linking in Firebase terms.
In this use-case you first sign in the user with either of these providers, and then link the credentials from the other provider from the same account. So you end up with a single account, with two linked providers.
To find out what providers are linked to an email address (for example to render a UI with the sign-in options for a user), you'll want to call fetchSignInMethodsForEmail
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…