admin管理员组文章数量:1125075
I've implemented firebase authentication in my figma plugin, but what i'm stuck at, is the persistence of the auth state upon closing and reopening the plugin.
Since figma plugin runs in a sandboxed environment, I can't use firebase's built in persistence.
The workaround that i've currently implemented is, upon sign in i store the users idtoken and refresh token in figma's client storage.
To access firestore etc. I'm using this idtoken by appending it to REST API headers. which is working fine but i want to use firestore SDK instead of REST. which can't be done without initializing firebase auth instance.
I also don't want to use a cloud function to get a custom token and use signInWithCustomToken, since everytime a user would close/reopen the app the function would get invoked.
Please help!
本文标签: Is there a way to persist Firebase Auth in Figma PluginStack Overflow
版权声明:本文标题:Is there a way to persist Firebase Auth in Figma Plugin? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736627701a1945710.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论