Better auth for a swift app with a hono backend - pain & suffering or a good idea?
Hi everyone, I'm not going to feign expertise - I am building my first real full application for iOS and MacOS in Swift - I am doing this in Swift with Swift UI. I have aspirations to eventually get the app to be fully cross platform, so I have opted to create the backend for the application in Hono/TS rather than lock in with with a backend as a service. After a lot of agony I think I am leaning towards better auth but do want to maybe get some feedback from the community...
Is this a good call over rolling something like Supabase that has a dedicated iOS/MacOS SDK for Auth? How hard of a time will I have? Admittedly, we use Entra ID at work for sign-in and our apps just redirect to microsoft for the privilege. My auth experience is very limited, so I know for a fact I don't want to roll my own, and this seems like a better option. I just wonder how much extra work I'm signing up for by not having a dedicated Swift client.
2 Replies
You're making a solid choice by opting for Hono/TypeScript over a BaaS like Supabase, especially if you aim for cross-platform compatibility in the long run. However, your concerns about authentication complexity without a dedicated Swift SDK are valid.
In my experience, I'd recommend Supabase to you for easy setup and fully supported built-in manage flow.
But you're using Entra ID for login flow, and then Supabase doesn't support it natively, so Hono/TS would be good choice for you.
It will take more times like customize all thing such as OAuth, JWT, Swift integration
That’s the thing I’m trying to avoid :P Supabase really has a BaaS that also happens to offer Auth as part of that flow. It is a MASSIVE swift SDK to pull just for Auth