Skip to content

Instantly share code, notes, and snippets.

View evansuner's full-sized avatar
💭
I may be slow to respond.

Evan evansuner

💭
I may be slow to respond.
View GitHub Profile
@janakamarasena
janakamarasena / secret_gen.rb
Last active May 2, 2024 01:21
Sign In with Apple Client Secret Generator
require "jwt"
key_file = "Path to the private key"
team_id = "Your Team ID"
client_id = "The Service ID of the service you created"
key_id = "The Key ID of the private key"
validity_period = 180 # In days. Max 180 (6 months) according to Apple docs.
private_key = OpenSSL::PKey::EC.new IO.read key_file