You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like SendMagicLinkEmail appends RedirectTo to the POST body of the request, but it looks like the server expects it to be a query parameter. When a magic link is requested using this library using a redirect_to option, the magic link returned from the server ignores the option passed.
I spun up a Supabase instance here so I could dump the request data and used two client environments: a Flutter app which I know works, and a C# app which does not, both using the same API.
When requesting a magic link using the flutter library, it makes a request to the server like so: POST /auth/v1/magiclink?redirect_to=com.example.example%3A%2F%2Flogin-callback%2F HTTP/1.1" 200 2 "-" "Dart/2.16 (dart:io)
with a POST body of: {\x22email\x22:\x22email@example.com\x22}
Using this C# library, the request instead looks like this: POST /auth/v1/magiclink HTTP/1.1" 429 91 "-" "Dalvik/2.1.0 (Linux; U; Android 12; sdk_gphone64_x86_64 Build/SPB5.210812.003)
with a POST body of: {\x22email\x22:\x22email@example.com\x22,\x22redirect_to\x22:\x22com.example.example://login-callback/\x22}
The text was updated successfully, but these errors were encountered:
…rameter instead of POST data
`GetSessionFromUrl` accounts for gotrue sending a url of the format: `http://localhost:9000?status=success#access_token=blahblah`
Signed-off-by: Joseph Schultz <joseph@acupofjose.com>
* Update usage of redirectTo to reflect gotrue-js usage
* Fixes#29 by changing `redirect_to` into a query parameter instead of POST data
`GetSessionFromUrl` accounts for gotrue sending a url of the format: `http://localhost:9000?status=success#access_token=blahblah`
It seems like SendMagicLinkEmail appends RedirectTo to the POST body of the request, but it looks like the server expects it to be a query parameter. When a magic link is requested using this library using a redirect_to option, the magic link returned from the server ignores the option passed.
I spun up a Supabase instance here so I could dump the request data and used two client environments: a Flutter app which I know works, and a C# app which does not, both using the same API.
When requesting a magic link using the flutter library, it makes a request to the server like so:
POST /auth/v1/magiclink?redirect_to=com.example.example%3A%2F%2Flogin-callback%2F HTTP/1.1" 200 2 "-" "Dart/2.16 (dart:io)
with a POST body of:
{\x22email\x22:\x22email@example.com\x22}
Using this C# library, the request instead looks like this:
POST /auth/v1/magiclink HTTP/1.1" 429 91 "-" "Dalvik/2.1.0 (Linux; U; Android 12; sdk_gphone64_x86_64 Build/SPB5.210812.003)
with a POST body of:
{\x22email\x22:\x22email@example.com\x22,\x22redirect_to\x22:\x22com.example.example://login-callback/\x22}
The text was updated successfully, but these errors were encountered: