Next Js 14 Authentication on Edge Runtime

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ย. 2024

ความคิดเห็น • 39

  • @ScottUmble
    @ScottUmble ปีที่แล้ว +7

    This is the EXACT video I was looking for. Thanks!

    • @maghfoorx
      @maghfoorx  ปีที่แล้ว

      Glad I could help!🫡😁

  • @PUTTEKOOL
    @PUTTEKOOL 11 หลายเดือนก่อน

    Love it, combination of Google auth and edge for next app router 🤩

  • @thecodelogin
    @thecodelogin 9 หลายเดือนก่อน

    Very clear and easy understanding. Very straight forward. Thank You Man You saved my month. 🎉❤ Can you please make straight forward video for manually signup and login without any providers?

  • @akhil_sarikonda
    @akhil_sarikonda 9 หลายเดือนก่อน

    How to handle Redirect URI for vercel preview links? Upon successful authentication, Google redirects the user to the URL which we set in the "Redirection URI" field in the Google Console. As the URLs change for every vercel preview deployment, setting a static URL in the "Redirection URI" results in a mismatch. So how to handle this?

  • @Kv-kk2nj
    @Kv-kk2nj 10 หลายเดือนก่อน

    Cool! Quick explanation and easy to understand dude

    • @maghfoorx
      @maghfoorx  10 หลายเดือนก่อน

      Thank you dude

  • @cangorkemgunes
    @cangorkemgunes 6 หลายเดือนก่อน

    Hello Mr. If I add mongodb adapter, it gives error and I think it is about edge runtime. (I don't have enough knowledge about edge and node.js runtime) Is there a way to implement the structure where I store sessions in my mongodb(I also use mongoose). Please make video or help me about this.

  • @incarnateTheGreat
    @incarnateTheGreat 11 หลายเดือนก่อน +3

    I'm happy to see Next Auth will be stable and ready soon. Just to be clear: if I want to manage a database of users to authorize during a login process, Next Auth will not support that? Looks like it only handles Google Auth at the moment.
    I think what I'm talking about is more Clerk-based. Thanks for the video!

    • @maghfoorx
      @maghfoorx  11 หลายเดือนก่อน +1

      Yeah managing having database in your users is possible. That's the next video Im working on showing how to implement a database adapter into next Auth :)

    • @incarnateTheGreat
      @incarnateTheGreat 11 หลายเดือนก่อน +1

      @@maghfoorx bless!

    • @salamandr4111
      @salamandr4111 11 หลายเดือนก่อน +2

      @@maghfoorx please please do it with prisma 🙏🙏🙏🙏🙏🙏🙏

    •  11 หลายเดือนก่อน

      @@maghfoorx we are waiting ❤🥳

  • @toluwanimiadeyemo8099
    @toluwanimiadeyemo8099 10 หลายเดือนก่อน

    Thank you for this video!

  • @luishernandosendoyaserrato2544
    @luishernandosendoyaserrato2544 11 หลายเดือนก่อน

    Muchas gracias por tu video, excelente explicación.

  • @DarkoLuketic
    @DarkoLuketic วันที่ผ่านมา

    What is "Edge Runtime"?

  • @polyander
    @polyander 11 หลายเดือนก่อน +1

    have you tried lucia as well? how do you feel it compares to the new next-auth? :)

    • @maghfoorx
      @maghfoorx  11 หลายเดือนก่อน +1

      Actually a good question because I was considering using it. Gonna try it properly and see

  • @usamecoban2582
    @usamecoban2582 ปีที่แล้ว +2

    what is the benefit of using edge runtime ?

    • @maghfoorx
      @maghfoorx  ปีที่แล้ว +2

      There are many benefits. For example normally if you deploy on vercel or aws, your application runs on the node runtime. It's a serverless environment so you can have cold starts which makes your application slow.
      With the edge runtime you don't have the cold start problem, makes your application really snappy fast. Also my main goal is to deploy my application on Cloudflare, which doesn't support node runtime. So I need to make my application edge runtime compatible.
      Hope this makes sense:)

    • @coolemur976
      @coolemur976 ปีที่แล้ว +7

      Let me Chat GPT that for you:
      Traditional authentication processes often rely on a central server. With Edge Runtime, authentication logic can be executed closer to the user, enhancing speed and security.
      Edge-based authentication can reduce the risk of DDoS attacks and improve data privacy, as data doesn't have to travel back to a central server.
      This approach is beneficial for applications requiring low latency, such as real-time apps, and for handling authentication in a distributed environment.

    • @maghfoorx
      @maghfoorx  ปีที่แล้ว +4

      Much better haha thanks!

    • @BarisPalabiyik
      @BarisPalabiyik ปีที่แล้ว

      @@coolemur976 Lol, it's actually just the edge, edge runtime is different, it's cloudflare workers running in a virtual machine in a long running big server, you can have node runetime distrubed on the edge, which would meet what chatgpt says but not this example, edge and edge runtime are different.

    • @Finch-Bro
      @Finch-Bro 9 หลายเดือนก่อน

      ⁠@@maghfoorxme 2. thanks a lot 。❤

  • @adwher
    @adwher ปีที่แล้ว +2

    Which font do you use? 👀

    • @maghfoorx
      @maghfoorx  ปีที่แล้ว

      Lilex nerd font:)

  • @muhammadrizkiakbar-ls3qj
    @muhammadrizkiakbar-ls3qj 11 หลายเดือนก่อน +1

    is this using pages router or app router ??

    • @maghfoorx
      @maghfoorx  11 หลายเดือนก่อน

      App router

  • @itsyourboyt4683
    @itsyourboyt4683 11 หลายเดือนก่อน +1

    Hey. Are you planning to release the source code too?

    • @maghfoorx
      @maghfoorx  11 หลายเดือนก่อน

      Hi here's the source code: github.com/sphorb/next-js-authentication-v5-package
      Hope you find it helpful :)

  • @hxg.1
    @hxg.1 ปีที่แล้ว +1

    Can I do the email and password?
    If I can, can you please make a video showing best practices?

    • @maghfoorx
      @maghfoorx  ปีที่แล้ว +6

      Yes it is possible but you need to connect with a database on the edge runtime. That's exactly what I'm currently working on to find out😁 will release a video in the future to show how it's done

    • @hxg.1
      @hxg.1 ปีที่แล้ว

      @@maghfoorx thanks, I have made one using and email and password but I don't believe it's best practices that's why I asked 😁🤍
      I'll be waiting for you.

    • @hxg.1
      @hxg.1 3 หลายเดือนก่อน

      ​@@maghfoorx hello, so after 8mo have u done it?😁🤍

  • @HenriqueNewsted
    @HenriqueNewsted ปีที่แล้ว +2

    Which OS are you using? It looks like Ubuntu but the titlebar buttons are kinda different than gnome's

  • @zeahoo
    @zeahoo 11 หลายเดือนก่อน

    hello there, I wonder know why signIn('google') doesn't work when i use next-auth@beta