[PR #4981] [CLOSED] fix: support compressed ipv6 format #5691

Closed
opened 2026-03-13 12:31:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4981
Author: @cth-latest
Created: 9/30/2025
Status: Closed

Base: canaryHead: fix/support-compressed-ipv6-format


📝 Commits (10+)

📊 Changes

89 files changed (+5901 additions, -1434 deletions)

View changed files

demo/expo-example/.env.example (+7 -0)
demo/expo-example/.gitignore (+20 -0)
demo/expo-example/README.md (+15 -0)
demo/expo-example/app.config.ts (+55 -0)
demo/expo-example/assets/bg-image.jpeg (+0 -0)
demo/expo-example/assets/fonts/SpaceMono-Regular.ttf (+0 -0)
demo/expo-example/assets/icon.png (+0 -0)
demo/expo-example/assets/images/adaptive-icon.png (+0 -0)
demo/expo-example/assets/images/favicon.png (+0 -0)
demo/expo-example/assets/images/logo.png (+0 -0)
demo/expo-example/assets/images/partial-react-logo.png (+0 -0)
demo/expo-example/assets/images/react-logo.png (+0 -0)
demo/expo-example/assets/images/react-logo@2x.png (+0 -0)
demo/expo-example/assets/images/react-logo@3x.png (+0 -0)
demo/expo-example/assets/images/splash.png (+0 -0)
demo/expo-example/babel.config.js (+9 -0)
demo/expo-example/components.json (+6 -0)
demo/expo-example/index.ts (+1 -0)
demo/expo-example/metro.config.js (+39 -0)
demo/expo-example/nativewind-env.d.ts (+3 -0)

...and 69 more files

📄 Description

Summary by cubic

Fixes request IP parsing to fully support compressed IPv6, ensuring accurate detection across headers and environments. Also adds an Expo authorization proxy and example app, plus small docs/blog updates and OAuth state hardening.

  • Bug Fixes

    • Replaced custom regex with zod ipv4/ipv6 validation to accept compressed IPv6 in get-request-ip.
    • Hid internal types from getSession responses (removed options/path leakage).
    • Made OAuth state handling stricter by setting and validating a signed, short-lived state cookie.
  • New Features

    • Expo: added /expo-authorization-proxy endpoint and updated the Expo client to use it for OAuth flows.
    • New demo: Expo example app with email/password and GitHub/Google sign-in.
    • Docs: support form endpoint, blog listing tweaks, and new post.

🔄 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/4981 **Author:** [@cth-latest](https://github.com/cth-latest) **Created:** 9/30/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/support-compressed-ipv6-format` --- ### 📝 Commits (10+) - [`825f8e1`](https://github.com/better-auth/better-auth/commit/825f8e1d7ca9eba91e8b80acce491684c9437692) init - [`b2ddc0c`](https://github.com/better-auth/better-auth/commit/b2ddc0c1b484ecf555d7f7a30c9d3e72313eb962) blog - [`22cd9f0`](https://github.com/better-auth/better-auth/commit/22cd9f0c95626a0c525753e4e51d2d53e115464e) chore: dotenv - [`42af8f8`](https://github.com/better-auth/better-auth/commit/42af8f81d13d1ea808928b1d714a1606d5666fe9) update - [`7af508e`](https://github.com/better-auth/better-auth/commit/7af508ee908f764ee9458f6bc9eeb6ab4c825d6d) some update - [`1be889b`](https://github.com/better-auth/better-auth/commit/1be889bb831c879474bdc51cdf96264a13b666a5) docs: add mentions - [`8bc6b18`](https://github.com/better-auth/better-auth/commit/8bc6b18c702b70c9919d27840420e50bd6c61d5e) updates - [`8aeb9b0`](https://github.com/better-auth/better-auth/commit/8aeb9b018835ff93cec8ed6eb837a0a3523ea2aa) chore: use tsconfig monorepo setup (#4826) - [`a3baacb`](https://github.com/better-auth/better-auth/commit/a3baacb148ee8120a19641f6442f993037354f20) docs: change banner - [`d007bda`](https://github.com/better-auth/better-auth/commit/d007bdac99ad626ec8233b32eeedd5bb3de036cb) docs: add link to auth.js team announcement ### 📊 Changes **89 files changed** (+5901 additions, -1434 deletions) <details> <summary>View changed files</summary> ➕ `demo/expo-example/.env.example` (+7 -0) ➕ `demo/expo-example/.gitignore` (+20 -0) ➕ `demo/expo-example/README.md` (+15 -0) ➕ `demo/expo-example/app.config.ts` (+55 -0) ➕ `demo/expo-example/assets/bg-image.jpeg` (+0 -0) ➕ `demo/expo-example/assets/fonts/SpaceMono-Regular.ttf` (+0 -0) ➕ `demo/expo-example/assets/icon.png` (+0 -0) ➕ `demo/expo-example/assets/images/adaptive-icon.png` (+0 -0) ➕ `demo/expo-example/assets/images/favicon.png` (+0 -0) ➕ `demo/expo-example/assets/images/logo.png` (+0 -0) ➕ `demo/expo-example/assets/images/partial-react-logo.png` (+0 -0) ➕ `demo/expo-example/assets/images/react-logo.png` (+0 -0) ➕ `demo/expo-example/assets/images/react-logo@2x.png` (+0 -0) ➕ `demo/expo-example/assets/images/react-logo@3x.png` (+0 -0) ➕ `demo/expo-example/assets/images/splash.png` (+0 -0) ➕ `demo/expo-example/babel.config.js` (+9 -0) ➕ `demo/expo-example/components.json` (+6 -0) ➕ `demo/expo-example/index.ts` (+1 -0) ➕ `demo/expo-example/metro.config.js` (+39 -0) ➕ `demo/expo-example/nativewind-env.d.ts` (+3 -0) _...and 69 more files_ </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Fixes request IP parsing to fully support compressed IPv6, ensuring accurate detection across headers and environments. Also adds an Expo authorization proxy and example app, plus small docs/blog updates and OAuth state hardening. - **Bug Fixes** - Replaced custom regex with zod ipv4/ipv6 validation to accept compressed IPv6 in get-request-ip. - Hid internal types from getSession responses (removed options/path leakage). - Made OAuth state handling stricter by setting and validating a signed, short-lived state cookie. - **New Features** - Expo: added /expo-authorization-proxy endpoint and updated the Expo client to use it for OAuth flows. - New demo: Expo example app with email/password and GitHub/Google sign-in. - Docs: support form endpoint, blog listing tweaks, and new post. <!-- 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-03-13 12:31:56 -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#5691