Next.js Role-Based User Authorization & Access Control | Next Auth Protected Routes

preview_player
Показать описание


⭐ Become a full-stack web dev with Zero To Mastery Courses:

👇 Follow Me On Social Media:

(00:00) Intro
(00:05) Welcome
(00:31) Getting Started
(01:02) Starter Code
(01:54) Options - OAuth profile function
(05:46) Options - Credentials authorize function
(06:41) Persisting the role
(08:52) TypeScript Module Augmentation
(13:47) Middleware - withAuth wrapper
(18:27) Environment variables
(19:41) Trying out the configuration
(23:25) Analyzing the results
(24:16) Component changes
(27:12) Middleware - authorized callback changes
(27:49) Middleware - Role-Based Access Routing
(31:46) Denied page
(32:29) Trying out the new Middleware configuration

📚 Tutorial References:

#nextjs #user #authorization
Рекомендации по теме
Комментарии
Автор

i have been waiting for Role based user Authorization and i have not seen anything good, Thank God Dave came in because he definitely do justice to the topic

therealdevopsintern
Автор

Best instructor out there, no BS, straight to the point

maherworld
Автор

Another great video Dave, just in time. I really appreciate your work and help you provide to all of us

DanielMolnar_Tuzla
Автор

Awesome, I saw so many tuts about this and none of them seemed to do the job. Subscribed 👌

bandekhoda
Автор

Thank you for making both email and OAuth, really rare to find, if at all

yt-sh
Автор

This is the best role-based auth for next-auth I ever seen. Thank you a lot!

nodttt
Автор

Finally role base auth! Thanks Dave... sorry for my last comment frustration with constant self learning failure got the best of me! All I'm looking for NOW IS 2 Factor auth with Google Authenticator but starting to believe it's impossible with Next.js. I'm trying for a year now to find something and all that came up is a outdated npm package full issues 😢

codernerd
Автор

Wow, Just what i needed to implement authorization successfully!

alfredgithinji
Автор

Thank you very much for the content, it added a lot to me. The doubt that persisted the most for me was: How can I create a custom login screen, for instance, at /login, and carry out authentication on the server side?

marcelo-k
Автор

Thanks Dave!
you're awesome!!🎉🎉🎉🎉

MOJICA
Автор

what a great tutorial! thanks for sharing!

nenosegura
Автор

easiest subscribe ever. well done on going deeper than the rest with real world issues!

orenmizr
Автор

Give Dave 1 Million subscribers. You are the best instructor.. Thanks for your insight.

eazydatasolutions
Автор

Great tutorial as always, very clear and informative.
Would you also please make a tutorial covering refresh token scenarios like the react auth series.

What would be different regarding the server side and how to handle refreshing the token both on server requests and, if needed, on client-side requests like using swr

youssefwafik
Автор

Great video Dave, as always. I have a question, if my backend return the access_token in Response headers and even in the Response body, how can I pass it to the jwt callback?

danielnieto
Автор

thanks a lot for these next tutorials, may you add a prisma tutorial with mongo db and next js

xelion
Автор

Great! Tutorial with db integration would be nice as well!

alexanderhenting
Автор

Thank you for this great video. I have a question if I may. Would this work for a static export and hosted on any web server? Or would I need a nodejs environment?

goncalopereira
Автор

OOhh man, this is awesome, Thank you Dave, we own you so much, ty again! great video!

jesustzinon
Автор

Thanks Dave, can you make a tutorial with custom backend and next-auth?

hungnguyencanh