How can I authenticate a user from a mobile app

I was wondering, if a user has been authenticated using wasp auth from the website, how can I authenticate that user from my mobile app? Is there any sort of API that I need to use for it? Sorry if my question is too noob. Web seems very vast and overwhelming, I am just looking for something easy. So far I have been using firebase to authenticate users and do the subscription through App Store. But I need to have a web authentication now
9 Replies
Filip
Filip9mo ago
Hey @zero-aspect, thanks for reaching out! Wasp does not yet support first-class mobile client support (as it does with the web via react). In other words, you absolutely can have a mobile app, but it's going to take a little more work. I'll try to help you out, but I'll need a little more context before I can say something useful. How did you build the mobile app? Is it already running?
zero-aspect
zero-aspectOP9mo ago
Thanks for the help,I built the app with Unity3d , c# is the language used. The app is already running . https://polymuse.tech, in the hero you can find the Android and iOS version, in case you are looking for that? Currently the way I do the subscription is very manual. If people buy from my website using the stripe link, I email them a code and they have to put it on the app to activate the subscription
MEE6
MEE69mo ago
Wohooo @zero-aspect, you just became a Waspeteer level 1!
Filip
Filip9mo ago
Hmm, ok, I think I understand. And where would Wasp fit into this system (in other words, which part would you like to implement in Wasp)?
zero-aspect
zero-aspectOP9mo ago
Basically, currently I don’t have any user authentication in the app. So my idea was to 1. I use the open SaaS platform to create the website where user can sign in and manage their subscription. 2. From my app if I can authenticate the users using some rest api or something, I could pull the information about their subscription?
Filip
Filip9mo ago
Very creative thinking 😄 Unfortunately, Wasp doesn't yet expose the API for authenticating users (the idea is to use its internal RPC, which doesn't make sense for your use case). I think that working around this might be possible but am not sure whether it's worth the effort. Maybe @miho knows something I don't, he's the main guy behind our auth as it currently stands, so let's wait for him to chip in.
zero-aspect
zero-aspectOP9mo ago
Understood 😀, I really wish I paid some more attention to web dev during my undergrad 😅. If i can’t use wasp, I have alternative plan to use firebase with some front end. But sadly don’t see that much nice SaaS boilerplate( like openSaaS) for firebase. So may be I need to learn some front end after all
martinsos
martinsos9mo ago
I see that Firebase has a packge for Unity that you can install and get Auth quite easily! We would ideally have something like that for Wasp, but we don't yet. You could potentially try to maybe load a WebView in your app that opens web app in Wasp, specifically login/signup, and tries to authenticate user, and then potentially obtain that data somehow in your mobile app and sent it with requests, but since my mobile dev knowledge is quite rusty / limited I can't say at the moment if this would work well, it sounds quite tricky.
zero-aspect
zero-aspectOP9mo ago
Thanks for being so friendly and responsive. I have done it with firebase. Thanks
Want results from more Discord servers?
Add your server