Skip to content

Commit ef7c82d

Browse files
Add Apple to list of providers. (#323)
* user_management: add Apple to list of providers. This may be me completely understanding this code but: this looked like an omission here so I thought I'd open a PR for discussion. * types/provider: add another missing Apple addition. * Fix specs * Fix Rubocop offense --------- Co-authored-by: Michael Hadley <m@mthadley.com>
1 parent 840c795 commit ef7c82d

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/workos/types/provider.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Provider
1010
Google = 'GoogleOAuth'
1111
Microsoft = 'MicrosoftOAuth'
1212

13-
ALL = [GitHub, Google, Microsoft].freeze
13+
ALL = [Apple, GitHub, Google, Microsoft].freeze
1414
end
1515
end
1616
end

lib/workos/user_management.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Provider
1919
Microsoft = 'MicrosoftOAuth'
2020
AuthKit = 'authkit'
2121

22-
ALL = [GitHub, Google, Microsoft, AuthKit].freeze
22+
ALL = [Apple, GitHub, Google, Microsoft, AuthKit].freeze
2323
end
2424

2525
# The AuthFactorType is a declaration of a

spec/lib/workos/sso_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@
281281
described_class.authorization_url(**args)
282282
end.to raise_error(
283283
ArgumentError,
284-
'Okta is not a valid value. `provider` must be in ["GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth"]',
284+
'Okta is not a valid value. `provider` must be in ' \
285+
'["AppleOAuth", "GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth"]',
285286
)
286287
end
287288
end

spec/lib/workos/user_management_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
end.to raise_error(
214214
ArgumentError,
215215
'Okta is not a valid value. `provider` must be in ' \
216-
'["GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth", "authkit"]',
216+
'["AppleOAuth", "GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth", "authkit"]',
217217
)
218218
end
219219
end

0 commit comments

Comments
 (0)