Allow only requesting the oauth scopes that an app needs
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 68/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- ios, objective-c
- Ambito
- authentication, mobile
Direzione di ricerca
Inizia da GoogleSignIn/Sources/GIDSignInInternalOptions.m e GoogleSignIn/Sources/GIDScopes.m, soprattutto dalla gestione degli scope referenziati. Verifica come vengono aggiunti email e profile, quindi determina dove può essere esposto un opt-out retrocompatibile. Il lavoro è completato quando il comportamento predefinito rimane invariato e l’opt-out richiede solo gli scope dell’app che li utilizza.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem you're having? Please describe.
My app needs to write new files to Google Drive, and it needs nothing else. As such, the only scope I request is https://www.googleapis.com/auth/drive.file. However, the login screen suggests that the app will be much more invasive than it is:
It appears that additional scopes beyond what the consuming app requests are always requested:
https://github.com/google/GoogleSignIn-iOS/blob/main/GoogleSignIn/Sources/GIDSignInInternalOptions.m#L56
https://github.com/google/GoogleSignIn-iOS/blob/main/GoogleSignIn/Sources/GIDScopes.m#L58
Specifically it looks like the email and profile scopes are always added.
My assumption is that those additional scopes are unnecessary for basic usage, but please tell me if I am incorrect.
As an additional downside, requesting extraneous scopes makes implementing Google's new granular permissions more messy and complicated.
Describe the solution you'd like
In the spirit of the principle of least privilege, it should be possible to use Google SignIn without extraneous scopes added. To do this in a backwards compatible way, the current behavior should remain the default, but it should be possible to set a flag to avoid scopes being added.
This seems like a very small change.
Describe alternatives you've considered
First, it's possible that those other scopes are necessary for all Google API usage. However, the fact that granular permissions allows rejecting them, that seems false.
Second, it's possible that consumers of Google SignIn just live with requesting extra scopes. However, that makes their apps look more invasive than they need, and thus sketchy. Further, it means that developers need to unnecessarily handle the more complicated granular permission case where you request many scopes.
Additional context
I'm happy to contribute this feature if it would be accepted.
- Lingua principale
- Objective-C
- Stelle
- 751
- Fork
- 282
- Merge medio
- 4g 20h
- PR unite (30g)
- 11
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di google/GoogleSignIn-iOS
-
enhancement triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
google/GoogleSignIn-iOS#621 ·
-
enhancement triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
google/GoogleSignIn-iOS#620 ·
-
enhancement triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
google/GoogleSignIn-iOS#611 ·
-
Remove Cocoapods Support Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
google/GoogleSignIn-iOS#607 ·
-
enhancement triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
google/GoogleSignIn-iOS#602 ·
Tutte le issue di google/GoogleSignIn-iOS
Issue simili
-
Suzhou subway logo ApertaIcons Metro Public Transport
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
organicmaps/organicmaps#13617 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
objective-see/LuLu#925 ·
-
macOS下查找brew::ncurse失败 Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
noah-nuebling/mac-mouse-fix#2054 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
obsproject/obs-studio#13918 ·