Returns the scope (String? or ApiScope) for a given grant name.
Object? grantScope(String name) { for (final g in grants) { if (g.name == name) return g.scope; } return null; }