• Erwindo Sianipar
    Interaction designer
    Software Engineer
  • blog
    craft
    portfolio
    snippet
    guestbook
    update
    login
ES
Caritas in VeritateMade with love from Jakarta
© 2019-2025 Erwindo Sianipar. All Rights Reserved.
termspoliciescookiesanalytics

Sign in with Apple in JavaScript

Apple OAuth implementation in JavaScript

avatar
Posted by Erwindo SianiparOct 10, 2023 (2 years ago) · 3 min read
en
EngineeringJavaScript
https://images.unsplash.com/photo-1581287053822-fd7bf4f4bfec
Photo by Charlesdeluvio on Unsplash

Registering App Identifier and App Secret

Recommend to use reversed domain pattern like com.domain.subdomain
developer.apple.com
https://developer.apple.com/account/resources/identifiers/add/bundleId
Register a services to use Sign in with Apple and complete the configuration like whitelisting the domain and the redirect URI.
developer.apple.com
https://developer.apple.com/account/resources/identifiers/list/serviceId

JSON Web Token Validation

After receive the authorization token from providers like Apple or Google service, we need to verify that the JWT token is signed from the valid providers.
⚠️
The step bellow is very important to ensure that the request that coming into the server is legit for authentication

Apple Public Keys Service

When it comes to Apple's public keys for JWKs, they are primarily used for authentication and authorization in Apple's identity and access management systems, such as Apple's Sign in with Apple service. These public keys are made available by Apple to verify the authenticity of JWTs generated during the authentication process.
appleid.apple.com
https://appleid.apple.com/auth/keys

Google Public Keys Service

Google's public keys for JWKs are used for various authentication and security purposes, particularly in the context of OAuth 2.0. Google provides these public keys to allow third-party applications and services to verify and authenticate tokens issued by Google.
www.googleapis.com
https://www.googleapis.com/oauth2/v3/certs
ℹ️
The blog is continuing written and research to completely this article, feel free to give me a feedback for this things, I will be very appreciate.
More from Erwindo SianiparSee all

https://images.unsplash.com/photo-1603623898218-0cb7f493309b

Ekstensi Berguna untuk Peramban

Gunakan ekstensi peramban ini untuk membantu memudahkanmu
Nov 24(2 years ago)
https://images.unsplash.com/photo-1581287053822-fd7bf4f4bfec

Sign in with Apple in JavaScript

Apple OAuth implementation in JavaScript
Oct 10(2 years ago)
subtitle
Apple OAuth implementation in JavaScript
comments
title
Sign in with Apple in JavaScript
slug
sign-in-with-apple-in-javascript
published
Oct 10, 2023
tags
All
Engineering
JavaScript
image
https://images.unsplash.com/photo-1581287053822-fd7bf4f4bfec
active
active
lang
en
type
blog