Skip to content

Add test coverage for the userinfo profile-fetch fallback #620

Description

@w-goog

The userinfo request in GIDSignIn.m does not have any test coverage (this is the fallback that fetches basic profile data if the ID token doesn't carry it).

Suggested changes:

  • Set up a sign in whose ID token lacks profile claims, so the profile-fetch fallback runs
  • Assert the userinfo request URL: scheme, host, path /oauth2/v3/userinfo, and the access_token query parameter
  • Include a token containing URL-reserved characters (&, =, #). (testDisconnectNoCallback_tokenWithReservedCharacters does this to test recent changes that ensure those characters are encoded correctly)
  • Assert the returned data maps correctly onto GIDProfileData

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageIssues that need to be triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions