google / google/GoogleSignIn-iOS
Add test coverage for the userinfo profile-fetch fallback
- Langage dominant
- Objective-C
- Étoiles
- 750
- Forks
- 282
- Merge moyen
- 2 j 15 h
- PR mergées (30 j)
- 9
Description
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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start with GIDSignIn.m and the existing testDisconnectNoCallback_tokenWithReservedCharacters test for setup and URL-encoding behavior. Add coverage for an ID token without profile claims, verify the /oauth2/v3/userinfo URL and encoded access_token, and confirm the response maps correctly onto GIDProfileData.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- objective-c
- Domaine
- authentication, mobile, testing
- Type d'issue
- Fonctionnalité
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- Calme
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 76/100