GoogleSignIn Framework Reference

GIDToken

@interface GIDToken : NSObject <NSSecureCoding>

This class represents an OAuth2 or OpenID Connect token.

  • The token string.

    Declaration

    Swift

    var tokenString: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull tokenString;
  • The estimated expiration date of the token.

    Declaration

    Swift

    var expirationDate: Date? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSDate *expirationDate;
  • Check if current token is equal to another one.

    Declaration

    Swift

    func isEqual(to otherToken: GIDToken) -> Bool

    Objective-C

    - (BOOL)isEqualToToken:(nonnull GIDToken *)otherToken;

    Parameters

    otherToken

    Another token to compare.