Fix: GitHub Copilot Device Flow token_type validation - Accept any token type case (Bearer, bearer, etc)

This commit is contained in:
Rowboat Developer 2026-04-17 10:40:43 -05:00
parent b7866e3067
commit 97853c4b4c
6 changed files with 834 additions and 61 deletions

View file

@ -7,7 +7,7 @@ export const OAuthTokens = z.object({
access_token: z.string(),
refresh_token: z.string().nullable(),
expires_at: z.number(), // Unix timestamp
token_type: z.literal('Bearer').optional(),
token_type: z.string().optional(), // Accept any token type (Bearer, bearer, etc.)
scopes: z.array(z.string()).optional(), // Granted scopes from OAuth response
});