Firebase Email verification not working with ActionCodeSetting

后端 未结 1 1080
轮回少年
轮回少年 2021-01-23 07:54

I\'m trying to implement verification of a user\'s email (with the default verification URL in the email template), AND an ActionCodeSetting URL (dynamic link) to bring the user

1条回答
  •  无人共我
    2021-01-23 08:11

    When the link triggers your app to open. You need to parse the oobCode from the deep link. You can use FDL client library to get the deep link. Refer to the following documentation on the format of the deep link and how to parse the code: https://firebase.google.com/docs/auth/custom-email-handler

    Once you get the code, you need to apply it using the auth.applyActionCode(code) API. This will verify the email.

    After verification, you can call user.reload() to update the emailVerified property on the user. You can also force user.getIdToken(true) to force refresh the token with the updated verified email if you are using Firebase security rule.

    0 讨论(0)
提交回复
热议问题