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
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.
ah, do you think local storage is the main reason?
cookies prob
yeah having the same problem with react-native / expo not supporting cookies in a meaningful way.
unfortunately,
next-auth/expo
got abandoned. 😦ahh what did u end up using then?
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.
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•3y ago
Message Not Public
Sign In & Join Server To View
Wrote an article about it: https://www.valerius.me/posts/adding-authentication-and-authorization-to-create-t3-turbo-incl-expo-with-clerkdev
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...