# GoogleSignIn Framework Reference

# GIDConfiguration

    @interface GIDConfiguration : NSObject <NSCopying, NSSecureCoding>

This class represents the client configuration provided by the developer.
- `


  ### [clientID](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDConfiguration#/c:objc(cs)GIDConfiguration(py)clientID)


  ` 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;

- `


  ### [serverClientID](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDConfiguration#/c:objc(cs)GIDConfiguration(py)serverClientID)


  ` The client ID of the home server. This will be returned as the `audience` property of the
  OpenID Connect ID token. For more info on the ID token:
  <https://developers.google.com/identity/sign-in/ios/backend-auth>

  #### Declaration

  Swift

      var serverClientID: String? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) NSString *serverClientID;

- `


  ### [hostedDomain](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDConfiguration#/c:objc(cs)GIDConfiguration(py)hostedDomain)


  ` The Google Apps domain to which users must belong to sign in. To verify, check
  `https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDGoogleUser.html`'s `hostedDomain` property.

  #### Declaration

  Swift

      var hostedDomain: String? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) NSString *hostedDomain;

- `


  ### [openIDRealm](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDConfiguration#/c:objc(cs)GIDConfiguration(py)openIDRealm)


  ` 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;

- `


  ### [-initWithClientID:](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDConfiguration#/c:objc(cs)GIDConfiguration(im)initWithClientID:)


  ` Initialize a `GIDConfiguration` object with a client ID.

  #### Declaration

  Swift

      convenience init(clientID: String)

  Objective-C

      - (nonnull instancetype)initWithClientID:(nonnull NSString *)clientID;

  #### Parameters

  |---|---|
  | ` clientID ` | The client ID of the app. |

  #### Return Value

  An initialized `GIDConfiguration` instance.
- `


  ### [-initWithClientID:serverClientID:](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDConfiguration#/c:objc(cs)GIDConfiguration(im)initWithClientID:serverClientID:)


  ` Initialize a `GIDConfiguration` object 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

  |---|---|
  | ` clientID ` | The client ID of the app. |
  | ` serverClientID ` | The server's client ID. |

  #### Return Value

  An initialized `GIDConfiguration` instance.
- `


  ### [-initWithClientID:serverClientID:hostedDomain:openIDRealm:](https://developers.google.com/identity/sign-in/ios/reference/Classes/GIDConfiguration#/c:objc(cs)GIDConfiguration(im)initWithClientID:serverClientID:hostedDomain:openIDRealm:)


  ` Initialize a `GIDConfiguration` object 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

  |---|---|
  | ` clientID ` | The client ID of the app. |
  | ` serverClientID ` | The server's client ID. |
  | ` hostedDomain ` | The Google Apps domain to be used. |
  | ` openIDRealm ` | The OpenID realm to be used. |

  #### Return Value

  An initialized `GIDConfiguration` instance.