timothymiller / t4-app

A powerful cross-platform UI toolkit for building actually native iOS, Android, macOS, Windows, Linux, and Progressive Web Apps with React (Native).
https://t4stack.com
MIT License
1.45k stars 77 forks source link

Lucia auth #97

Closed rmarscher closed 11 months ago

rmarscher commented 11 months ago

Here's an example of switching to lucia-auth. It might be interesting to use a generator to give t4 app users the option to scaffold lucia-auth or supabase. I tried to not remove too much of the supabase code here with switching to lucia-auth.

I added a little example to send email via resend.com if the RESEND_API_KEY is set. Otherwise, it returns an error with the email link it would have sent.

There are oauth configurations for apple sign-in, google and discord. I don't personally have those set up... so it would be good if someone could try this and make any necessary fixes. I haven't tested that and I haven't tested thoroughly on native. Most of my testing was with email sign-in on web.

albbus-stack commented 11 months ago

I'll put this on hold until we fix #94, it is creating problems also on the recently merged tauri branch.

timothymiller commented 11 months ago

LGTM!