diff --git a/lib/nylas/resources/auth.rb b/lib/nylas/resources/auth.rb index 4133d5a8..6c30c066 100644 --- a/lib/nylas/resources/auth.rb +++ b/lib/nylas/resources/auth.rb @@ -151,7 +151,7 @@ def build_query_with_pkce(config, secret_hash) def url_auth_builder(config) builder = URI.parse(api_uri) builder.path = "/v3/connect/auth" - builder.query = URI.encode_www_form(build_query(config)).gsub!("+", "%20") + builder.query = URI.encode_www_form(build_query(config)).gsub(/\+/, "%20") builder end