Hey:wave: How do we handle deep links on desktop?...
# supabase-kt
i
Hey👋 How do we handle deep links on desktop? Im currently using supabaseClient.handleDeeplinks() for Android/ios
j
Saw your issue, couldn't answer yet. So on on the JVM target you have two options: • Use OTPs instead of magic links, so users will just enter the code received in their email • Use deeplinks. The thing is this is not as straightforward on JVM/Desktop, you normally register these deeplinks while installing the application and then you'd have to use a library like https://github.com/prat-man/unique4j to send deeplink data to the already-open application instead of opening a second instance. Thus, there is no built-in support in the library.
i
Np, I should’ve joined the channel a while ago 😃 Thank you! I’ll try out the OTP for desktop and get back to you
So I’ve decided to go with anonymous login but convert user to permanent if they wish to do so How do we link the anonymous user to the google/apple account when using composeAuth.rememberSignInWithGoogle or composeAuth.rememberSignInWApple ?
j
These methods are for signing in, just looked it up there doesn't seem to be a way to convert a anonymous user with native auth
You'll have to use
linkIdentity()
i
Ok, thanks! So I tried using
linkIdentity()
With google but then I get an Access Denied message on the google page, am I missing a step? Because using native auth with google generally works (obv without trying to convert anonymous to permanent) but not with
linkIdentity()
j
Does "normal" OAuth work? Did you set it up correctly?
i
when you say "normal" do you mean signing in to my app using
composeAuth.rememberSignInWithGoogle
? if so yes it works, i got my google client id, enabled google provider
I can get some snippets from my private repo, if you want to see what I’m doing?
j
Normal via 'auth.signInWith(Google)' so no native auth
i
I haven’t used that before, I can try it out and see if that works can
auth.signInWith(Google)
convert anonymous user to a permanent user?
j
No, thats just to sign in, but if that doesn't work then the Google configuration is wrong
👍 1
i
Ok, I’ve got it working now 🚀 , I was doing 2 things wrong • I added the Android clientId instead of the web clientId when enabling google provider • i didn’t add the redirectUrl in google cloud (web qauth) that you get when enabling google provider Thanks for the help!!
👍 1
j
Just an info, the Supabase API now supports linking identities with Native Auth, I'll implement it aswell. reference: https://github.com/supabase/supabase-swift/pull/776
🙌 1