Auth on Mobile vs Web

In my mind, auth is mostly collecting username/password and sending it to the server, then the server can verify whether or not the username/password is correct. When the user visits again, I guess we need to re-authenticate with the JWT that's on the device. But none of these seem to mean that we need to do anything different for mobile vs web yet things like NextAuth don't support mobile yet, and most auth solutions have separate SDKs for mobile/web.
9 Replies
Turtled
Turtled•3y ago
Those auth frameworks probably use cookies or local storage to store the token, both of which are browser specific things that mobile apps don't have access to without emulating it, so they need to store in a unique way.
Chen
ChenOP•3y ago
ah, do you think local storage is the main reason?
Turtled
Turtled•3y ago
cookies prob
inselbegabter
inselbegabter•3y ago
yeah having the same problem with react-native / expo not supporting cookies in a meaningful way. unfortunately, next-auth/expo got abandoned. 😦
Chen
ChenOP•3y ago
ahh what did u end up using then?
inselbegabter
inselbegabter•3y ago
Sorry for the late reply. I solved it. Gonna make an example repo in the coming days But the solution uses clerk.dev instead of next-auth, since the expo support is currently not available.
Chen
ChenOP•3y ago
ohhh clerk looks nice! honestly there r so many login options nowadays, hard to figure out the core feature of each how did you like clerk? Have u used firebase before?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
inselbegabter
inselbegabter•3y ago
Adding Authentication and Authorization to create-t3-turbo (incl. E...
This is a guide on how to add authentication and authorization to a create-t3-turbo (incl. Expo) project using clerk.dev. The goal is to secure your app and ensure that only authorized users have access to certain features or resources. By using clerk.dev, you can easily add authentication and authorization to your create-t3-turbo app without ha...
Want results from more Discord servers?
Add your server