wnbot
BABetter Auth
•Created by wnbot on 12/20/2024 in #help
Is it possible to auth both nextjs and mobile app (android/iOS)?
it's native app. in my opinion, if use email sign in, the mobile app sends the email and password or otp-code to better-auth, and then receives a bearer token to access authorized resources. if use oauth, like sign in with google, the app sends a idToken which got from local google-auth-sdk to better-auth, then better-auth should verify the idToken then generate a bearer token to mobile app. I found this documentation to verify the idToken : https://developers.google.com/identity/sign-in/ios/backend-auth#node.js .by the way, the web app of nextjs, still use cookie to auth use. I'm new to node, I'm not sure if what I said is accurate, please correct me if I'm wrong. and sorry for my bad English.
3 replies