How to use Firebase Auth with Astro

Поділитися
Вставка
  • Опубліковано 3 жов 2024

КОМЕНТАРІ • 18

  • @dannyhenning8395
    @dannyhenning8395 Місяць тому

    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

  • @friendly__drone9352
    @friendly__drone9352 3 місяці тому +2

    I"m loving these Astro videos!

  • @lostinthenarrativve
    @lostinthenarrativve 3 місяці тому +3

    Hey man, can you do supabase+Astro next? or lucia.

    • @emireles
      @emireles 2 місяці тому

      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 :)

  • @oktubr3
    @oktubr3 3 місяці тому

    You rock man! Thank you!!!

  • @SabahRahal-m2q
    @SabahRahal-m2q 3 місяці тому

    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?

  • @real_igbo_land
    @real_igbo_land Місяць тому

    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?

    • @CodinginPublic
      @CodinginPublic  Місяць тому

      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!

  • @palockocz
    @palockocz 3 місяці тому

    Only output server can be used or also output hybrid?

    • @CodinginPublic
      @CodinginPublic  3 місяці тому +1

      Also hybrid. Just make sure you mark routes you need SSR with prerender = false

  • @bobbyb6412
    @bobbyb6412 2 місяці тому

    does this just use firebase for auth? could the rest of your routes / site point to a totally different service?

  • @andersonmarquesbsb
    @andersonmarquesbsb 3 місяці тому

    The best! ⬆⬆

  • @Ryujin_001
    @Ryujin_001 2 місяці тому

    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

    • @CodinginPublic
      @CodinginPublic  Місяць тому

      Have you figured this out? I'd likely have to see your code?