Skip to content

Commit

Permalink
change type (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
marktran authored May 20, 2020
1 parent 7329d90 commit 0528e78
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
workos (0.2.3)
workos (0.3.1)
sorbet-runtime (~> 0.5)

GEM
Expand Down
6 changes: 3 additions & 3 deletions lib/workos/sso.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions spec/lib/workos/sso_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
redirect_uri: 'foo.com/auth/callback',
state: {
next_page: '/dashboard/edit',
},
}.to_s,
}
end
it 'returns a valid URL' do
Expand Down Expand Up @@ -47,7 +47,7 @@
redirect_uri: 'foo.com/auth/callback',
state: {
next_page: '/dashboard/edit',
},
}.to_s,
}
end
it 'returns a valid URL' do
Expand Down Expand Up @@ -80,7 +80,7 @@
redirect_uri: 'foo.com/auth/callback',
state: {
next_page: '/dashboard/edit',
},
}.to_s,
}
end
it 'raises an error' do
Expand All @@ -101,7 +101,7 @@
redirect_uri: 'foo.com/auth/callback',
state: {
next_page: '/dashboard/edit',
},
}.to_s,
}
end
it 'raises an error' do
Expand Down

0 comments on commit 0528e78

Please sign in to comment.