How to authenticate user session after 3rd party redirect?

Hi everyone, I’m trying to figure out the best way to automatically authenticate a user in Supabase after a third-party payment (Barion) redirect. I’ve considered a few approaches, but I’m not sure which is the most reliable, especially in local development and production. Using Supabase locally with Docker. My goal is to authenticate the user after redirects happen. Before starting the payment my user was already logged in. Any working ideas? Run out of after several try-error.
3 Replies
ibrahim
ibrahim2d ago
Isn't the user session persisted in the browser so if they were authenticated then went to a payment page, i assume that being redirected back would let them log in?
smileyoer
smileyoerOP2d ago
Actually I found the issue. The domain and redirect domain differs and thats why it loose the session. What strange is that localhost and 127.0.0.1 not meant the same domain, so it was not self explanatory at first glance.
ibrahim
ibrahim2d ago
Right that makes sense

Did you find this page helpful?