Комментарии:
Thank you so much Brett!
ОтветитьI really sort this type of content,prisma,custom login page ,credentials,next-auth so far this is the best tutorial for that
Ответитьyou should have used typescript
ОтветитьThank you. The official next auth guide for credentials provider is broken and this helped out
ОтветитьThank you for the detailed tutorial! Can you also make a video on "Remember Me" functionality with Next Auth?
ОтветитьDude, you're the first one who normally explained how to work with the ugly "NextAuth" along with "login/password" without fуcking authentication via a social network.
Thank you.
why you didnt add the middleware?
ОтветитьI've got an error, does anyone have any solutions?:
PrismaClientInitializationError:
Invalid `prisma.user.findUnique()` invocation:
Error in connector: Error creating a database connection. (Kind: An error occurred during DNS resolution: proto error: io error: A socket operation was attempted to an unreachable network. (os error 10051), labels: {})
Hey, is using NextResponse.json mandatory here? Why don't we just use Response global object instead ?
ОтветитьIf I have a express.js backend where I have setup a MySQL database with Sequelize, and i have a next.js frontend, how could I make it work with NextAuth?
ОтветитьHow do I access the session a server component (the equivalent of useSession for server side)?
ОтветитьBro is majestic
Ответитьtnx, great tutorial, my question is how bcrypt can unhash hashedPassword without any salt ? (how this working?)
ОтветитьAfter you've wrapped everything in SessionProvider, will you actually get to register page? I'm being redirected to login page in my app. Now I think maybe I need to create (protected) and (public) folders after which wrap children in layout.tsx inside (protected) folder. Not sure if it's best practice but it might work
ОтветитьSo cool. The tutorials in the Chinese community are so old that I had to come here for help
ОтветитьGreat tutorial but the zoom is kind of annoying
ОтветитьBrett keeps deleting my comment so I'll keep writing it. If you're here in believe that this is a solid tutorial on Next auth, this ain't!!! Brett solution is utter rubbish!! I've recreated he's solution only to find zero authentication happening, users can access the dashboard page by localhost:300/dashboard WITHOUT NEVER logging in!!! users can login with any email or password without NEVER registering that user. He's solution is a complete joke. Don't waste your time here I like did, there is ZERO authentication happening with he's tutorial!!!
ОтветитьNo Sign out functionality!!! therefore what is the point!
ОтветитьGreat tutorial than you, but why username instead of email? How do you handle if you want email login and for example google and facebook? Thank you
ОтветитьHello Brett is it possible to redirect the user to the `onboarding` page after signup and the user doesn't have to login when using credential provider?
ОтветитьThe mixing of camelCase and snake_case keys in that Prisma schema is painful to see. I know libraries can have their own conventions (even if they are wrong by using snake_case in JS), but that accounts model has both cases in the same table. Very very messy. Please use @map() directive to normalize so improper snake_case fields get converted to the proper camelCase names, so in code you can use the proper camelCase convention.
Ответитьi followed your guide to a t and love it i dont really want to learn type script yet..... but i when i try to sign in i have to do it twice in order to get signed in.. did i miss something in this one or your other jwt video ? no errors just have to sign in twice.
incase someone else runs across this i spent longer on this and found my issue was i was redirecting the same time i was signing in i put await in front of sign in and it solved my issue
Im going to lose my mind hearing you say Prisma wrong
ОтветитьAmazing
Ответитьgit repo would be super-helpful with few nuances
ОтветитьHi, great job!
Some questions...
How about persist token to client and use it in API requests? How to refresh token too and use this solution with a google provider and still use a valid token to make requests, for example?
I don't understand. How this example use adapter Prisma? Session won't be save in database. We can you next-auth without adapter Prisma, and in authorize () call Prisma.
ОтветитьAs `bcrypt` is not available on Edge runtime, how do I need to encrypt passwords?
ОтветитьWhere is the register code? Why can't I find it?
Ответитьuse ts ?🤔
Ответить! important
How to implement role based redirect. eg. for user has "/user" and for admin has "/admin". When I signin successfully then it will automatically redirect.
Thanks it helped me a lot, when building my Saas.
ОтветитьДякую, саме те що шукав!
Ответитьhow shall we structure the database if we need both oauth and credential login
ОтветитьI tried to implement this but it doesn't create a session-token in the browser. It only works with the /api/auth/signIn default page but with /my-login it won't create that session. I even have pages: {
signIn: '/my-login',
},
is it possible to implement this using server actions?
ОтветитьNice video
ОтветитьThank you for the great tutorial. Keep up the good work!
ОтветитьThis almost worked until I got to login. it doesn't print the session to the console or the dashboard.
ОтветитьGod bless you for this work. i expected logout any way.
ОтветитьYou did miss a part , if we look at the redirect method that you made after signIn , even if the user provide wronf credentials , it still route him to dashboard
Ответитьwhere are source code brother?
ОтветитьVery good, followed your tutorial and got everything working, subscribed.
ОтветитьReally love your video… please can you make a video using typescript … I’m having issues passing the session as a props in the rootLayout
ОтветитьIs it possible to share the github repo with us? 😃
ОтветитьDoes the NextAuth Provide any JWT , your server doesn't send that token though?
ОтветитьAwesome content. Just right things at the right time. Love it.
ОтветитьYou set the session as a required prop on the Provider, but when wrapping the body with it, you never pass that prop. How does that work?
Ответитьcan i try this with sql?, this tutorial is very useful, and i am very happy, after few days studying about credentials
Ответить