(data: AuthParams)
| 216 | } |
| 217 | |
| 218 | async function processAuthData(data: AuthParams) { |
| 219 | identifyUser(data.user_id); |
| 220 | trackEvent("user_signed_in", { platform: "desktop" }); |
| 221 | |
| 222 | await authStore.set({ |
| 223 | secret: |
| 224 | "api_key" in data |
| 225 | ? { api_key: data.api_key } |
| 226 | : { token: data.token, expires: data.expires }, |
| 227 | user_id: data.user_id, |
| 228 | plan: null, |
| 229 | }); |
| 230 | |
| 231 | await commands.updateAuthPlan(); |
| 232 | } |
no test coverage detected