Awesome man! Seems like a great course, I feel like it would be useful for many of you added in a module about adding Stripe as well as most web apps, SaaS, etc would require payments somehow
Excellent video, I followed the steps and I have a problem, when I log in and enter from another session (any other device), the application understands as if I were logged in, any recommendations?
In case you or someone else tries this. I encountered an issue when trying this with Supabase where the error would not pass down from the action since it comes wrapped in a AuthError class. To handle it just use the function isAuthApiError() to check if there is an error returned from the call and then you can throw an ActionError() to actually pass it down the action response when using the .safe() method in the action call. Hope this helps someone :)
Hi Chris nice Tutorial. Have been following along to implement your example in one of my own projects but got a XHR POST 404 not found at the /_actions/when logging in or registering. Obviously followed by a JSON Parse error. 😞 Downloaded your finished project file and got the same error. Any idea whats going on? Am looking for project documentation on astro actions, but cant really find any. Could you help out?
They switched up actions I think to no longer is the .safe method. So just remove that but keep the { error, data } I think? Let me know if that works!
Bro after deploy to vercel auth.currentUser is null. Login signup and logout works well but never load the profile page because of the null currentUser
Awesome man! Seems like a great course, I feel like it would be useful for many of you added in a module about adding Stripe as well as most web apps, SaaS, etc would require payments somehow
I"m loving these Astro videos!
Glad you like them! Go Astro!
Excellent video, I followed the steps and I have a problem, when I log in and enter from another session (any other device), the application understands as if I were logged in, any recommendations?
Hey man, can you do supabase+Astro next? or lucia.
In case you or someone else tries this. I encountered an issue when trying this with Supabase where the error would not pass down from the action since it comes wrapped in a AuthError class. To handle it just use the function isAuthApiError() to check if there is an error returned from the call and then you can throw an ActionError() to actually pass it down the action response when using the .safe() method in the action call.
Hope this helps someone :)
Hi Chris nice Tutorial. Have been following along to implement your example in one of my own projects but got a XHR POST 404 not found at the /_actions/when logging in or registering. Obviously followed by a JSON Parse error. 😞 Downloaded your finished project file and got the same error. Any idea whats going on?
Am looking for project documentation on astro actions, but cant really find any. Could you help out?
They switched up actions I think to no longer is the .safe method. So just remove that but keep the { error, data } I think? Let me know if that works!
You rock man! Thank you!!!
Glad it was a help!
does this just use firebase for auth? could the rest of your routes / site point to a totally different service?
sure, if you want!
Bro after deploy to vercel auth.currentUser is null. Login signup and logout works well but never load the profile page because of the null currentUser
Have you figured this out? I'd likely have to see your code?
Only output server can be used or also output hybrid?
Also hybrid. Just make sure you mark routes you need SSR with prerender = false
The best! ⬆⬆
Glad you found it helpful!