GIDConfiguration
@interface GIDConfiguration : NSObject <NSCopying, NSSecureCoding>This class represents the client configuration provided by the developer.
-
The client ID of the app from the Google Cloud Console.
Declaration
Swift
var clientID: String { get }Objective-C
@property (nonatomic, readonly) NSString *_Nonnull clientID; -
The client ID of the home server. This will be returned as the
audienceproperty of the OpenID Connect ID token. For more info on the ID token: https://developers.google.com/identity/sign-in/ios/backend-authDeclaration
Swift
var serverClientID: String? { get }Objective-C
@property (nonatomic, readonly, nullable) NSString *serverClientID; -
The Google Apps domain to which users must belong to sign in. To verify, check
GIDGoogleUser‘shostedDomainproperty.Declaration
Swift
var hostedDomain: String? { get }Objective-C
@property (nonatomic, readonly, nullable) NSString *hostedDomain; -
The OpenID2 realm of the home server. This allows Google to include the user’s OpenID Identifier in the OpenID Connect ID token.
Declaration
Swift
var openIDRealm: String? { get }Objective-C
@property (nonatomic, readonly, nullable) NSString *openIDRealm; -
Initialize a
GIDConfigurationobject with a client ID.Declaration
Swift
convenience init(clientID: String)Objective-C
- (nonnull instancetype)initWithClientID:(nonnull NSString *)clientID;Parameters
clientIDThe client ID of the app.
Return Value
An initialized
GIDConfigurationinstance. -
Initialize a
GIDConfigurationobject with a client ID and server client ID.Declaration
Swift
convenience init(clientID: String, serverClientID: String?)Objective-C
- (nonnull instancetype)initWithClientID:(nonnull NSString *)clientID serverClientID:(nullable NSString *)serverClientID;Parameters
clientIDThe client ID of the app.
serverClientIDThe server’s client ID.
Return Value
An initialized
GIDConfigurationinstance. -
Initialize a
GIDConfigurationobject by specifying all available properties.Declaration
Swift
init(clientID: String, serverClientID: String?, hostedDomain: String?, openIDRealm: String?)Objective-C
- (nonnull instancetype)initWithClientID:(nonnull NSString *)clientID serverClientID:(nullable NSString *)serverClientID hostedDomain:(nullable NSString *)hostedDomain openIDRealm:(nullable NSString *)openIDRealm;Parameters
clientIDThe client ID of the app.
serverClientIDThe server’s client ID.
hostedDomainThe Google Apps domain to be used.
openIDRealmThe OpenID realm to be used.
Return Value
An initialized
GIDConfigurationinstance.