Skip to content

Commit

Permalink
Merge branch 'main' into TW-2712-sdk-v-3-update-default-timeout-to-90…
Browse files Browse the repository at this point in the history
…-seconds
  • Loading branch information
mrashed-dev authored Mar 4, 2024
2 parents 5cff3f9 + d97a9a5 commit 2165857
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/nylas/resources/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def detect_provider(params)
# @return [String] Updated list of parameters, including those specific to admin
# consent.
def build_query_with_admin_consent(config)
params = build_query(config)
params = build_http_query(config)

# Appends new params specific for admin consent.
params[:provider] = "microsoft"
Expand All @@ -135,7 +135,7 @@ def build_query_with_admin_consent(config)
# @return [String] Updated list of encoded parameters, including those specific
# to PKCE.
def build_query_with_pkce(config, secret_hash)
params = build_query(config)
params = build_http_query(config)

# Appends new PKCE specific params.
params[:code_challenge_method] = "s256"
Expand All @@ -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_http_query(config)).gsub(/\+/, "%20")

builder
end
Expand All @@ -160,7 +160,7 @@ def url_auth_builder(config)
#
# @param config [Hash] Configuration for the query.
# @return [Hash] List of parameters to encode in the query.
def build_query(config)
def build_http_query(config)
params = {
client_id: config[:client_id],
redirect_uri: config[:redirect_uri],
Expand Down

0 comments on commit 2165857

Please sign in to comment.