From 0528e784574532510b863a9e67438357d1571ce8 Mon Sep 17 00:00:00 2001 From: Mark Tran Date: Wed, 20 May 2020 15:11:39 -0400 Subject: [PATCH] change type (#38) --- Gemfile.lock | 2 +- lib/workos/sso.rb | 6 +++--- spec/lib/workos/sso_spec.rb | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ea0d810d..4b35250c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - workos (0.2.3) + workos (0.3.1) sorbet-runtime (~> 0.5) GEM diff --git a/lib/workos/sso.rb b/lib/workos/sso.rb index fa2d0223..41127ba5 100644 --- a/lib/workos/sso.rb +++ b/lib/workos/sso.rb @@ -31,7 +31,7 @@ class << self # @param [String] redirect_uri The URI where users are directed # after completing the authentication step. Must match a # configured redirect URI on your WorkOS dashboard. - # @param [Hash] state An aribtrary state object + # @param [String] state An aribtrary state object # that is preserved and available to the client in the response. # @example # WorkOS::SSO.authorization_url( @@ -55,11 +55,11 @@ class << self redirect_uri: String, domain: T.nilable(String), provider: T.nilable(String), - state: Hash, + state: T.nilable(String), ).returns(String) end def authorization_url( - project_id:, redirect_uri:, domain: nil, provider: nil, state: {} + project_id:, redirect_uri:, domain: nil, provider: nil, state: '' ) validate_domain_and_provider(provider: provider, domain: domain) diff --git a/spec/lib/workos/sso_spec.rb b/spec/lib/workos/sso_spec.rb index 10e92c64..04e689b0 100644 --- a/spec/lib/workos/sso_spec.rb +++ b/spec/lib/workos/sso_spec.rb @@ -13,7 +13,7 @@ redirect_uri: 'foo.com/auth/callback', state: { next_page: '/dashboard/edit', - }, + }.to_s, } end it 'returns a valid URL' do @@ -47,7 +47,7 @@ redirect_uri: 'foo.com/auth/callback', state: { next_page: '/dashboard/edit', - }, + }.to_s, } end it 'returns a valid URL' do @@ -80,7 +80,7 @@ redirect_uri: 'foo.com/auth/callback', state: { next_page: '/dashboard/edit', - }, + }.to_s, } end it 'raises an error' do @@ -101,7 +101,7 @@ redirect_uri: 'foo.com/auth/callback', state: { next_page: '/dashboard/edit', - }, + }.to_s, } end it 'raises an error' do