diff --git a/src/google/types.ts b/src/google/types.ts index dba81b68..a9ee312b 100644 --- a/src/google/types.ts +++ b/src/google/types.ts @@ -18,12 +18,12 @@ import { * Authorization code response from Google OAuth. */ export interface CodeResponse { - code: string; - error: string; - error_description: string; - error_uri: string; - scope: string; - state: string; + code?: string; + error?: string; + error_description?: string; + error_uri?: string; + scope?: string; + state?: string; } /** diff --git a/tests/googleService.test.ts b/tests/googleService.test.ts index 67905599..3cf6f4a5 100644 --- a/tests/googleService.test.ts +++ b/tests/googleService.test.ts @@ -16,14 +16,7 @@ const PROVIDER_BASE: OAuthProvider = { const AUTHORIZE_URL = "https://service.example.com/user/authorize"; -const CODE_RESPONSE: CodeResponse = { - code: "test-code", - error: "", - error_description: "", - error_uri: "", - scope: "", - state: "", -}; +const CODE_RESPONSE: CodeResponse = { code: "test-code" }; type LoginDispatch = Pick< SessionDispatch,