any strategies on authenticating multiplatform app...
# compose
a
any strategies on authenticating multiplatform apps with your own backend? I have deployed a few compose web apps and i authenticate them using passportjs on my backend. but that is not really flexible in a multiplatform environment ie having web + desktop app how do you do it?
I've seen tons of websites (not compose web) that switch the login button to 'go to dashboard' after a split second if you are already signed in. wondering if that's a standard way of authenticating apps that can be done in all platforms (not sure how to look that up)
with a quick look supabase does it using jwt. so launching a website to the server's auth page and then redirecting back to the app with the token seems to be the way to go
g
@Alex Styl That's how we do it. 1. Open the authentication web page with a redirect to a deep link in the app, using code + pkce 2. Retrieve the code from the redirect uri 3. exchange the code with the backend to get the token
a
thanks @Guyaume Tremblay. did you have to implement pkce manually? I roughly have an understanding of it. wonder if there is a ready built solution for it in kotlin
g
I did yes, but in Java. I haven't yet migrate it to kotlin (will do it soon)
a
by java you mean for the front end/app? what about the backend, if u can share
g
For the frontend/app yes. For the backend, we use Laravel, Auth0 or Microsoft if our client want to use them
a
fantastic. thanks for sharing Guyaume
👍 1