Home - nov/apple_id GitHub Wiki
AppleID
"Sign in with Apple" backend library in ruby.
Install
gem install apple_id
Require
require 'apple_id'
Caching
When calling ApleID::IdToken#verify!
with verify_signature: true
,
this gem automatically fetches Apple's JWKS and use it for signature verification.
If you want to cache the JWKS, set AppleID::JWKS.cache
,
then this gem caches JWKS until Apple start using new & non-cached JWK.
AppleID::JWKS.cache = Rails.cache
Debugging
Call AppleID.debug!
, then you'll see all HTTP requests after that line in the log.
In Rails, you'll need to set AppleID.logger = Rails.logger
.
AppleID.debug!
AppleID.logger = Rails.logger
Obtain Access Token & ID Token
See AppleID::Client.