def create_token(auth_data, options = {})
      if (auth_data.nil? or auth_data.empty?) and (options.nil? or options.empty?)
        raise ArgumentError, "FirebaseTokenGenerator.create_token: data is empty and no options are set.  This token will have no effect on Firebase."
      end
      validate_auth_data(auth_data, (!options.nil? and options[:admin] == true))
      claims = create_options_claims(options)
      claims[:v] = TOKEN_VERSION
      claims[:iat] = Time.now.to_i
      claims[:d] = auth_data
      token = encode_token(claims)
      if (token.length > 1024)
        raise RuntimeError, "FirebaseTokenGenerator.create_token: generated token is too long."
      end
      token
    end
def create_token(auth_data, options = {})
      if (auth_data.nil? or auth_data.empty?) and (options.nil? or options.empty?)
        raise ArgumentError, "FirebaseTokenGenerator.create_token: data is empty and no options are set.  This token will have no effect on Firebase."
      end
      validate_auth_data(auth_data, (!options.nil? and options[:admin] == true))
      claims = create_options_claims(options)
      claims[:v] = TOKEN_VERSION
      claims[:iat] = Time.now.to_i
      claims[:d] = auth_data
      token = encode_token(claims)
      if (token.length > 1024)
        raise RuntimeError, "FirebaseTokenGenerator.create_token: generated token is too long."
      end
      token
    end
When creating an instance of the generator, you must provide your Firebase Application Secret
 Returns a signed Firebase Authentication Token
 Takes the following arguments:
 [auth_data] A hash of arbitrary data to be included in the token
 [options] An optional hash of extra claims that may be included in the token. Allowed values are:
   [expires] Epoch time after which the token will no longer be valid
   [notBefore] Epoch time before which the token will not be valid
   [admin] If set to true, this client will bypass all security rules
   [debug] If set to true, this client will receive debug information about the security rules
   [simulate] (internal-only for now) Runs security rules but makes no data changes

 Throws ArgumentError if given invalid data or an invalid option
 Throws RuntimeError if generated token is too long