Practical Sign in with Apple demo code only
This demo will demonstrate :
1. Implementing Sign in with Apple UI on iOS, and retrieve user data and authorization code
2. Detect when user revoke sign in on Settings app, and auto log user out on iOS app
3. Backend - Decode and verify signature of identity token JWT
4. Backend - Generate client secret which is then used to communicate with Apple's endpoint
5. Backend - Exchange authorization code with Apple's endpoint to get access token and refresh token
6. Backend - Generating your own access token in your backend, so that your mobile app can use it authenticate API calls to your backend.
The demo also includes normal email/password sign up / login flow aside from Sign in with Apple, and also how to link existing email account with Apple sign in.
Demo preview : https://youtu.be/OTaivckQR0A
If you want a guide explaining each implementation steps in detail, check out https://gum.co/psiwa .
The code for iOS app and Ruby backend, and also the setup guide