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