[PR #2877] [MERGED] fix: correct way detect facebook limited token jwt #21438

Closed
opened 2026-04-15 20:22:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2877
Author: @reslear
Created: 6/2/2025
Status: Merged
Merged: 7/9/2025
Merged by: @Bekacru

Base: mainHead: patch-11


📝 Commits (3)

  • 0b32f0b fix: correct way detect facebook limited token jwt
  • 3e134e5 Update facebook.ts
  • c0c1d7c Update facebook.ts

📊 Changes

1 file changed (+4 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/social-providers/facebook.ts (+4 -3)

📄 Description

I found an issue with how I was detecting the JWT—it was incorrect. I’ve fixed it now.

Because token.split(".").length returns the total number of parts, but what we actually need is the value length 3 like jwt parts

  • changed jwks url

tested in prod


🔄 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/2877 **Author:** [@reslear](https://github.com/reslear) **Created:** 6/2/2025 **Status:** ✅ Merged **Merged:** 7/9/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `patch-11` --- ### 📝 Commits (3) - [`0b32f0b`](https://github.com/better-auth/better-auth/commit/0b32f0b36f0d2f37a75931390b9bc98ba179e006) fix: correct way detect facebook limited token jwt - [`3e134e5`](https://github.com/better-auth/better-auth/commit/3e134e5f3b1c640aa8d7eb1ba845e9c0ea3294a5) Update facebook.ts - [`c0c1d7c`](https://github.com/better-auth/better-auth/commit/c0c1d7cd8498ca7fa399c9e842d7eeb2952d64c4) Update facebook.ts ### 📊 Changes **1 file changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/social-providers/facebook.ts` (+4 -3) </details> ### 📄 Description I found an issue with how I was detecting the JWT—it was incorrect. I’ve fixed it now. Because `token.split(".").length` returns the total number of parts, but what we actually need is the value length 3 like jwt parts - [x] changed jwks url tested in prod --- <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-15 20:22:21 -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#21438