IP detection in redirect url breaks Expo Go deep linking

Open
#2,039 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go, react-native

Research direction

Start by reading internal/utilities/request.go around the IP-matching code at line 103, then reproduce the redirect validation with the documented Expo Go URL and an IP-based host URL. Done means Expo Go deep links with an IP in the later URL portion are accepted while redirects using an actual IP remain flagged.

Written by the indexing model from the issue text.

Description

bug

Bug report

  • [ x] I confirm this is a bug with Supabase, not with my own application.
  • [ x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When trying to redirect to a deep link while using expo go, supabase blocks the redirect url of exp://192.168.22.47:8081/--/auth because of the ip matching.

To Reproduce

  • Add exp://** as an additional redirect url
  • Set the redirect url for an oauth singin to expo go's deep link url (i.e. exp://192.168.22.47:8081/--/auth)

Expected behavior

Still flags redirects to actual ips, but if the ips are a part of the latter part of the url like above, it should continue

System information

  • OS: Linux (Host) Android (React Native + Expo)
  • Version of supabase-js: 2.49.5-next.1
  • Version of Node.js: 23.8.0

Additional context

The ip matching code:
https://github.com/supabase/auth/blob/a7b006acc01eea0a739580700ee3d7d78c794d4c/internal/utilities/request.go#L103

Dominant language
Go
Stars
2.6k
Forks
764
Avg merge
5d 3h
Merged PRs (30d)
39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/auth

All issues in supabase/auth

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.