Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(oauth-apple): support Sign in with Apple as a documented OmniAuth provider #1347

Merged
merged 1 commit into from
Oct 16, 2019
Merged

feat(oauth-apple): support Sign in with Apple as a documented OmniAuth provider #1347

merged 1 commit into from
Oct 16, 2019

Conversation

booleanbetrayal
Copy link
Collaborator

@booleanbetrayal booleanbetrayal commented Oct 16, 2019

Adds support for nhosoya/omniauth-apple gem + documentation for Sign in with Apple.

See related: lynndylanhurley/ng-token-auth#374

~~~ruby
# config/initializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do
provider :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], scope: 'email,profile'
provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET']
provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET']
provider :apple, ENV['APPLE_CLIENT_ID'], '', { scope: 'email name', team_id: ENV['APPLE_TEAM_ID'], key_id: ENV['APPLE_KEY'], pem: ENV['APPLE_PEM'] }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This provider does not accept a secret directly, rather it uses a p8 PEM certificate to generate JWT authorization tokens on the fly for provider handshake.

@nbrustein
Copy link
Contributor

Changeset looks good to me.

@booleanbetrayal booleanbetrayal merged commit d886f47 into lynndylanhurley:master Oct 16, 2019
@booleanbetrayal booleanbetrayal deleted the omniauth-apple_support branch October 16, 2019 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants