From f696d33b645c53369ec5833593bdc77c9fb7cea9 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Tue, 9 Apr 2024 19:05:28 +0100
Subject: fix: Delete the API key on logout from phone or extension

---
 apps/mobile/app/signin.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'apps/mobile/app/signin.tsx')

diff --git a/apps/mobile/app/signin.tsx b/apps/mobile/app/signin.tsx
index 283528df..80a5f219 100644
--- a/apps/mobile/app/signin.tsx
+++ b/apps/mobile/app/signin.tsx
@@ -22,7 +22,7 @@ export default function Signin() {
 
   const { mutate: login, isPending } = api.apiKeys.exchange.useMutation({
     onSuccess: (resp) => {
-      setSettings({ ...settings, apiKey: resp.key });
+      setSettings({ ...settings, apiKey: resp.key, apiKeyId: resp.id });
     },
     onError: (e) => {
       if (e.data?.code === "UNAUTHORIZED") {
-- 
cgit v1.3-1-g0d28

