[PR #5820] chore: use const tokenEndpoint declarations in social providers #14497

Closed
opened 2026-04-13 09:30:22 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5820

State: closed
Merged: Yes


Noticed that in some social-providers, we reuse the same const tokenEndpoint declarations while in others we don't. This PR aims to remove that redundancy wherever applicable i.e. where validateAuthorizationCode and refreshAccessToken use the same tokenEndpoint.


Summary by cubic

Consolidated tokenEndpoint declarations in social providers by defining a single const per provider when both authorization and refresh use the same endpoint. This removes duplication and keeps endpoints consistent with no behavior changes.

  • Refactors
    • Replaced inline tokenEndpoint strings with a const in: Apple, Atlassian, Discord, Figma, GitHub, Hugging Face, Kakao, Naver, Polar, Roblox, Slack, Spotify, TikTok, Twitch, Twitter (X), VK.
    • Re-synced with latest canary; cleanup only, no API or functional changes.

Written for commit d0e693dab0. Summary will update on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5820 **State:** closed **Merged:** Yes --- Noticed that in some social-providers, we reuse the same `const tokenEndpoint` declarations while in others we don't. This PR aims to remove that redundancy wherever applicable i.e. where `validateAuthorizationCode` and `refreshAccessToken` use the same `tokenEndpoint`. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Consolidated tokenEndpoint declarations in social providers by defining a single const per provider when both authorization and refresh use the same endpoint. This removes duplication and keeps endpoints consistent with no behavior changes. - **Refactors** - Replaced inline tokenEndpoint strings with a const in: Apple, Atlassian, Discord, Figma, GitHub, Hugging Face, Kakao, Naver, Polar, Roblox, Slack, Spotify, TikTok, Twitch, Twitter (X), VK. - Re-synced with latest canary; cleanup only, no API or functional changes. <sup>Written for commit d0e693dab07968fb7054d56be11d5345d7b4f10c. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:30:22 -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#14497