def user_auth_link(redirect_uri, options = {})
      raise ArgumentError.new(":scope is required") unless options[:scope]

      params = options.merge(redirect_uri: redirect_uri, response_type: 'code')

      # Reformat params as needed
      params.delete(:state) if params[:state].nil?

      if params[:scope].respond_to?(:join)
        params[:scope] = params[:scope].join(' ')
      end

      @auth_client.auth_code.authorize_url(params)
    end
def user_auth_link(redirect_uri, options = {})
      raise ArgumentError.new(":scope is required") unless options[:scope]

      params = options.merge(redirect_uri: redirect_uri, response_type: 'code')

      # Reformat params as needed
      params.delete(:state) if params[:state].nil?

      if params[:scope].respond_to?(:join)
        params[:scope] = params[:scope].join(' ')
      end

      @auth_client.auth_code.authorize_url(params)
    end
Internal: generate a URL for authorizing the application with Cronofy

 redirect_uri - A String specifing the URI to return the user to once they
                have completed the authorization steps.
 options      - The Hash options used to refine the selection
                (default: {}):
                :scope - Array or String of scopes describing the access to
                         request from the user to the users calendars
                         (required).
                :state - Array of states to retain during the OAuth
                         authorization process (optional).

 See http://www.cronofy.com/developers/api#authorization for reference.

 Returns the URL as a String.