I’m implementing Facebook authentication with Supabase in my Bubble app and getting this error on the callback:
error=server_error&error_code=unexpected_failure&error_description=Unable to exchange external code
My setup:
- Supabase project with Facebook provider enabled
- Facebook app configured with OAuth redirect to Supabase’s callback URL
- Bubble app that initiates the flow and handles the callback
What I’ve tried:
- I’ve tested with both my custom domain and the default Bubble domain prefix
- I’ve ensured consistent domain usage across all platforms for each test
- Verified my callback URLs match exactly between all three platforms
- Double-checked all Facebook app settings and Supabase configurations
I noticed that Facebook seems to handle URL formatting differently than Google. When I paste my authorization URL into Facebook’s Valid OAuth Redirect URIs, it automatically transforms and encodes the URL in a specific way, which might be causing compatibility issues with Supabase.
Important note: I successfully implemented Google authentication using the same approach. So my general Supabase auth setup seems correct, but something specific to the Facebook implementation isn’t working.
Has anyone successfully implemented Supabase + Facebook auth with Bubble? Are there any known issues or special considerations for Facebook specifically?
I’d appreciate any insights or working examples. Thanks!