Skip to content

Commit 7d2363d

Browse files
authored
fix(vscode): make id token optional/nullable (#4215)
1 parent b46a68c commit 7d2363d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

vscode/extension/src/auth/auth.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ const tokenSchema = z.object({
2727
exp: z.number(),
2828
email: z.string(),
2929
})
30+
3031
const statusResponseSchema = z.object({
3132
is_logged_in: z.boolean(),
32-
id_token: tokenSchema,
33+
id_token: tokenSchema.optional().nullable(),
3334
})
3435

3536
type StatusResponse = z.infer<typeof statusResponseSchema>;
@@ -298,7 +299,9 @@ export class AuthenticationProviderTobikoCloud
298299
)
299300

300301
if (messageResult === "Open browser") {
301-
await env.openExternal(Uri.parse(deviceCodeResponse.verification_uri_complete))
302+
await env.openExternal(
303+
Uri.parse(deviceCodeResponse.verification_uri_complete)
304+
)
302305
}
303306
if (messageResult === "Cancel") {
304307
ac.abort()

0 commit comments

Comments
 (0)