Skip to content

Commit 9264f91

Browse files
committed
keep same
1 parent 7665f86 commit 9264f91

File tree

1 file changed

+4
-4
lines changed
  • packages/dashboard-app/src/components/installs/modal/login

1 file changed

+4
-4
lines changed

packages/dashboard-app/src/components/installs/modal/login/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,10 @@ export default function LoginModal({ next }: { next: () => void }) {
7171
try {
7272
setError(null);
7373
setLoginState("loading");
74+
const res = await Auth.startUnifiedPortal({});
7475
setPkceTimedOut(false);
7576
setAuthRequestId(undefined);
7677

77-
const res = await Auth.startUnifiedPortal({});
78-
7978
// Handle social login (Google/GitHub)
8079
if (res.kind === "social") {
8180
Internal.sendWindowFocusRequest({});
@@ -294,8 +293,7 @@ export default function LoginModal({ next }: { next: () => void }) {
294293
onClick={() => {
295294
setLoginMethod("deviceCode");
296295
setLoginState("not started");
297-
setAuthRequestId(undefined);
298-
Auth.cancelPkceAuthorization().catch(console.error);
296+
setError(null);
299297
}}
300298
>
301299
Login with Device Code
@@ -335,6 +333,8 @@ export default function LoginModal({ next }: { next: () => void }) {
335333
onClick={() => {
336334
setLoginState("not started");
337335
setError(null);
336+
setAuthRequestId(undefined);
337+
Auth.cancelPkceAuthorization().catch(console.error);
338338
}}
339339
>
340340
Back

0 commit comments

Comments
 (0)