Articles

Sign in with Apple

Sign in with Apple end to end, from the iOS button and its nonce to the Vapor AuthService that verifies Apple's identity token and decides which account it belongs to, including the edge cases of linking an Apple ID to an account that already exists.

Keeping Users Signed In

How the Vapor AuthService rotates refresh tokens, why it hashes them with SHA-256 instead of Bcrypt, how sessions end, and how the iOS app refreshes tokens without the user noticing.

Rotating JWT Signing Keys

Why JWT signing keys need to change, and how the Vapor AuthService rotates its ES256 keys with a keyring, key ids and a JWKS endpoint, without logging anyone out or redeploying the other services.

Auth Server for Swift Server

Let me demonstrate a full workflow of an authentication using Swift Server (Vapor).