0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

<firebase auth>idp経由(OAuth)で認証したアカウントの更新時の挙動

0
Last updated at Posted at 2023-05-23

■ updateEmail
https://firebase.google.com/docs/auth/web/account-linking?hl=ja

上書きされる。idpはそのまま。
ただ、idpと関係ない任意のemailでも更新されるため、注意が必要

■ reauthenticate
https://cloud.google.com/identity-platform/docs/web/reauth?hl=ja

新規ユーザーが追加される。旧ユーザーは存在したまま

■ link
https://firebase.google.com/docs/auth/web/account-linking?hl=ja

ユーザーの中(providerData)に入れ子で追加される。
どちらのアカウントでも認証は通る。
rootのアカウント(auth.currentUser)は変わらない。
xxx@google.comyyy@google.comを紐づけることも可能

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?