Hello everyone. Did anyone try to implement Google...
# supabase-kt
m
Hello everyone. Did anyone try to implement Google or some other similar provider login on WASM? I'm having an issue where I do
signInWith(Google)
and it just redirects me to home page without any logs or anything happening. Am I doing something wrong or is Google login not supported yet?
j
Do you see URL parameters like "access_token" when redirecting to your homepage? (Might also be a fragment)
m
No URL parameters. Also if I specify redirect URL in that signInWith function it seems to be ignored
Not sure how to check the fragment thing (not a web developer so not even sure what those are 🙂 )
Also not sure if helpful but I'm on
2.2.2-wasm0
j
No URL parameters. Also if I specify redirect URL in that signInWith function it seems to be ignored
Did you add the redirect url to the authorized urls in the Supabase Dashboard?
Not sure how to check the fragment thing (not a web developer so not even sure what those are
The url would look like this: https://your.website.com/somepath#access_token=JWT
m
Ah no in the dashboard I did not do it. I will try now
I added these URLs and no luck - same result
also no to fragments. I just get redirected to
localhost:8080
j
So do you actually see the Google website or just straight to localhost?
m
straight to localhost
I see this in logs
I wonder if this happens because of how my navigation is set up... Maybe it tries to open that supabase.co page but my app url parser does not recognize and just opens home page
I guess potentially i need to add this supabase url to my destinations
m
Hmmm not sure what happens. Seems like that initial request gets cancelled
if I try to copy paste the url it tries to call in a browser manually I briefly see access token in parameters before I'm redirected to localhost
j
Can you try a different browser? Maybe try to Google this, haven't seen that before
m
Yeah I will investigate this a bit more to see what is going on. Maybe my app setup does not allow redirects like this. Web development is weird
u
You have to create a temporary local server to redirect to google login, i guess.
j
Thats not required for the wasm-js target, you only need that for Desktop/JVM. For wasm-js you can just use your website.
m
OK I did some digging. I'm using #decompose as navigation. And it seems like when I attach
WebHistoryController
then redirects to outside URLs does not work. Looking to see if there is a way to still allow to open external URL like this when using Decompose. cc @Arkadii Ivanov maybe you'll have some ideas. If I open that external URL in a separate browser tab then everything works as expected
a
Yeah, there might be an issue with WebHistoryController. Some changes may be needed.
m
I'm looking to see if in the meantime it's possible to wrap
DefaultWebHistoryController
and allow to redirect to external URL
Coming back to this again. Just checking if you maybe had any progress in allowing to navigate to external URLs?