问题描述
我第一次获得 FCM 并将其保存到我的 userDefaults.现在当用户注销时,如何再次刷新 FCM 令牌?我搜索了文档和许多其他问题,但没有找到更好的解决方案.
I am getting the FCM first time and save it to my userDefaults. Now When user logs out, how can I refresh the FCM token again? I have searched the docs and many other asked questions, but didn't find a better solution.
提前致谢.
推荐答案
FCM Token 是 Instance ID 令牌,它代表已安装的应用程序,而不是已登录的用户.通常,一旦应用保持安装状态,无论哪个用户登录,它都会拥有相同的令牌.
The FCM Token is an Instance ID token, it represents the installed app and not the signed in user. Generally once the app remains installed it will have the same token no matter what user is signed in.
您必须自己管理与令牌关联的用户.当用户登录时,您应该将令牌与用户的 ID 相关联,当用户退出时,您应该删除该关联.
You would have to manage what user is associated to the token yourself. When the user signs in you should associate the token with the user's ID and when the user signs out you should remove that association.
这篇关于如何在用户注销时刷新 FCM 令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)