[PR #3348] [CLOSED] feat(apple): Add automatic client secret generation for Apple provider #30374

Closed
opened 2026-04-17 21:29:24 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3348
Author: @Urbansson
Created: 7/12/2025
Status: Closed

Base: mainHead: feat/generate-apple-jwt-client-secret


📝 Commits (1)

  • 5bacf14 feat(apple): adding new config and function to generate apple clientSecret jwt

📊 Changes

1 file changed (+101 additions, -6 deletions)

View changed files

📝 packages/better-auth/src/social-providers/apple.ts (+101 -6)

📄 Description

Closes: #2900, #1522

Summary

Apple JWT client secrets have a limited lifespan and expire after 6 months or less, causing authentication failures when not manually renewed. This requires manual intervention and can lead to unexpected service disruptions.

This PR adds support for automatic client secret generation in the Apple social provider to prevent authentication failures due to expired JWT client secrets.

Solution

By adding new configuration fields to the Apple provider (teamId, keyId, and privateKey), the provider can now automatically generate fresh JWT client secrets as needed.

Changes

  • Added optional configuration fields for automatic secret generation
  • Implemented on-demand JWT client secret creation
  • Maintains backward compatibility with existing manual secret configurations

Summary by cubic

Added automatic client secret generation for the Apple provider to prevent authentication failures from expired JWT secrets.

  • New Features
    • Supports on-demand creation of Apple JWT client secrets using new config fields (teamId, privateKeyId, privateKey).
    • Maintains compatibility with manual client secret configuration.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/3348 **Author:** [@Urbansson](https://github.com/Urbansson) **Created:** 7/12/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/generate-apple-jwt-client-secret` --- ### 📝 Commits (1) - [`5bacf14`](https://github.com/better-auth/better-auth/commit/5bacf1453e2993892d677eda147ac8fc69ab8ce5) feat(apple): adding new config and function to generate apple clientSecret jwt ### 📊 Changes **1 file changed** (+101 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/social-providers/apple.ts` (+101 -6) </details> ### 📄 Description Closes: #2900, #1522 ## Summary Apple JWT client secrets have a limited lifespan and expire after 6 months or less, causing authentication failures when not manually renewed. This requires manual intervention and can lead to unexpected service disruptions. This PR adds support for automatic client secret generation in the Apple social provider to prevent authentication failures due to expired JWT client secrets. ## Solution By adding new configuration fields to the Apple provider (`teamId`, `keyId`, and `privateKey`), the provider can now automatically generate fresh JWT client secrets as needed. ## Changes - Added optional configuration fields for automatic secret generation - Implemented on-demand JWT client secret creation - Maintains backward compatibility with existing manual secret configurations <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added automatic client secret generation for the Apple provider to prevent authentication failures from expired JWT secrets. - **New Features** - Supports on-demand creation of Apple JWT client secrets using new config fields (`teamId`, `privateKeyId`, `privateKey`). - Maintains compatibility with manual client secret configuration. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 21:29:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#30374