google / google/GoogleSignIn-iOS

Add test coverage for the userinfo profile-fetch fallback

Offen Anfängerfreundlich
#620 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement triage
Vorherrschende Sprache
Objective-C
Sterne
750
Forks
282
Ø Merge
2 T. 15 Std.
Gemergte PRs (30 T.)
9

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
objective-c
Bereich
authentication, mobile, testing
Issue-Typ
Feature
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Ruhig
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
76/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.