Testing Auth flow on mobile with localhost Supabase
I am using NextJS with Supabase ssr for Auth (email) on localhost for development, it went well, however, whenever I tried on mobile connecting to my IP address, the Auth flow won't work anymore, especially I can not receive the confirmation email in Inbucket, so no way to click on the confirmation and rediect to callback.
Any guidance on how should I test it on mobile? Or I have to use the real Supabase project? Thanks!!
Setup: .env
NEXT_PUBLIC_SUPABASE_URL='http://127.0.0.1:54321'
NEXT_PUBLIC_SUPABASE_URL='http://127.0.0.1:54321'
Config.toml
[auth]enabled = true# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used# in emails.site_url = "http://127.0.0.1:3000"# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.additional_redirect_urls = ["https://localhost:3000", "http://localhost:3000/auth/callback", "http://192.168.1.136:3000/auth/callback"]# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).jwt_expiry = 3600# If disabled, the refresh token will never expire.enable_refresh_token_rotation = true# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.# Requires enable_refresh_token_rotation = true.refresh_token_reuse_interval = 10# Allow/disallow new user signups to your project.enable_signup = true[auth.email]# Allow/disallow new user signups via email to your project.enable_signup = true# If enabled, a user will be required to confirm any email change on both the old, and new email# addresses. If disabled, only the new email is required to confirm.double_confirm_changes = true# If enabled, users need to confirm their email address before signing in.enable_confirmations = true
[auth]enabled = true# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used# in emails.site_url = "http://127.0.0.1:3000"# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.additional_redirect_urls = ["https://localhost:3000", "http://localhost:3000/auth/callback", "http://192.168.1.136:3000/auth/callback"]# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).jwt_expiry = 3600# If disabled, the refresh token will never expire.enable_refresh_token_rotation = true# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.# Requires enable_refresh_token_rotation = true.refresh_token_reuse_interval = 10# Allow/disallow new user signups to your project.enable_signup = true[auth.email]# Allow/disallow new user signups via email to your project.enable_signup = true# If enabled, a user will be required to confirm any email change on both the old, and new email# addresses. If disabled, only the new email is required to confirm.double_confirm_changes = true# If enabled, users need to confirm their email address before signing in.enable_confirmations = true
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.