My best advice for finishing projects
8:41
15 сағат бұрын
Next.js MDX is pretty awesome
4:49
14 күн бұрын
Writing Cron Jobs Just Became Fun Again
12:50
Пікірлер
@GameOfflineIsLove
@GameOfflineIsLove Сағат бұрын
How do i add loading on server side in remix? , in next js, i can create a file call loading.tsx
@nimodammovil4046
@nimodammovil4046 Сағат бұрын
Overwrite. Underverse reference
@keshavakumar9828
@keshavakumar9828 7 сағат бұрын
When ever i feel down or dont wanna code I always comeback and look into your channel. your short videos and few motivational videos now and then helps a lot. thank you senpai
@ferez_
@ferez_ 9 сағат бұрын
not the video i wanted, the video i needed
@YuraZavadenko
@YuraZavadenko 11 сағат бұрын
how do u use server action in client component. Like with this startTransition thing, i truly don't get it
@nekotajni394
@nekotajni394 12 сағат бұрын
I am fighting with this library to create a setup where I can use separators to build out 2 sections, but each section to fall under the docs/ route. If there's any other folder inside of docs it immediately makes it a menu and I can't figure out any way around this. Do you know ?
@aaronmotacek9343
@aaronmotacek9343 13 сағат бұрын
Everything you said, plus I also like the Things app (syncs mobile/desktop, etc.) which I learned about from another solopreneur dev. Related to dev/projects, I mostly just use the “recurring todos” feature or little one-off tasks/reminders for a certain day… actual project management with Trello (or plannerai :) )
@erickthamara5154
@erickthamara5154 16 сағат бұрын
Thanks,i think this is good info
@omomer3506
@omomer3506 16 сағат бұрын
I think i have a crippling fear of failure or hating my final project, cuz i never make good looking projects (ui is not so good) and it kinda demoralising
@Sj0846
@Sj0846 20 сағат бұрын
Hi Code, Does railway provides its own CDN for nextjs app or do we have to use other cdn service like cloudflare? Thanks
@WebDevCody
@WebDevCody 18 сағат бұрын
You’d need to put cloudflare in front of
@volodymyrvolodymyr3965
@volodymyrvolodymyr3965 22 сағат бұрын
I can't even finish this video LMAO
@DojoDyo
@DojoDyo Күн бұрын
thank you cody
@Flash136
@Flash136 Күн бұрын
Please make a video on Lucia Auth 👀
@kalok1968
@kalok1968 Күн бұрын
Great Lecture. Very Well explained. Good tool earse.. I will certainly use this toll.
@user-ce8my5xb3v
@user-ce8my5xb3v Күн бұрын
Thanks man! I love your videos, it's fast but not fast enough to make it hard to understand and not slow enough to make me feel sleepy, your videos are precise and explains the connections/relationship between different things!
@amosmachoradevlogs
@amosmachoradevlogs Күн бұрын
coincidentally this is like what im doing like right now. Great vid. Here is a video idea. How to use next auth with an external backend. Without nextjs built in backend if you get what im trying to say. because there is this backend guy i work with who built the jwt himself then in my next app i use next-auth so we are really confused on how to amalgamate the two strategies.
@Raphael-jo1rp
@Raphael-jo1rp 2 күн бұрын
Small update on Drizzle Studio for those who face a problem to access it: 1/ update drizzle kit: npm i drizzle-kit@latest -D 2/ in the drizzle.config.ts, change driver to dialect and connectionString to url 3/ restart your studio: npm run db:studio It should work just fine.
@AndreaBarghigiani
@AndreaBarghigiani 2 күн бұрын
Personally in these cases I prefer use the `cn` utility function, you can use `clsx` straight btw. I just separate logically the classes in logic order and I'm set. From: ``` <input className='flex flex-col my-3 mx-auto w-1/2 bg-white text-slate-900 border border-slate-200 rounded-lg shadow-sm hover:shadow-lg hover:border-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-500 focus:border-slate-500' /> ``` To: ``` <input className={cn( 'flex flex-col my-3 mx-auto w-1/2', 'bg-white text-slate-900', 'border border-slate-200 rounded-lg shadow-sm', 'hover:shadow-lg hover:border-slate-300', 'focus:outline-none focus:ring-2 focus:ring-slate-500 focus:border-slate-500' )} /> ```
@hamoodrex
@hamoodrex 2 күн бұрын
I will stick to my VPS approaches. But I completely agree with you on the database and file storage part. It is stressful to always think about those and implement defensive measures in your backend for them.
@SirMeowMeow
@SirMeowMeow 2 күн бұрын
Has NextAuth basically been bought out by Clerk and turned into a sales funnel for them?
@ayukalvieri3154
@ayukalvieri3154 2 күн бұрын
l'm looking to enhance the security of my Next.js app by implementing a feature where users need to re-enter their password before accessing routes displaying sensitive information or performing critical actions. How can I protect these routes to ensure that only authenticated users who have re-entered their password can access them?
@divyamjoshi5782
@divyamjoshi5782 2 күн бұрын
What theme is that
@WebDevCody
@WebDevCody 2 күн бұрын
Bearded theme stained blue
@magnusred2945
@magnusred2945 2 күн бұрын
Bro it's way past time for you to move to Remix
@WebDevCody
@WebDevCody 2 күн бұрын
If remix had rsc and server actions I would
@magnusred2945
@magnusred2945 2 күн бұрын
@@WebDevCody they just showed off RSC today
@parkourbee2
@parkourbee2 2 күн бұрын
Thanks for sharing your perspective!
@parkourbee2
@parkourbee2 2 күн бұрын
Nice! Basically the architecture of Dokku with the UX of Vercel. I'm a fan.
@RellyBautista-np4pj
@RellyBautista-np4pj 2 күн бұрын
Why not just contribute in improving coffeescript rather than building another language..
@FFLOVEAR302
@FFLOVEAR302 2 күн бұрын
Cody, just watched your video on automated email testing. If you are into efficiency and hate wasting leads, I gotta recommend FilterBounce. Their verification is so accurate, it keeps bounce rates under 1%. You get top-notch results and practically eliminate wastage.
@user-ge2hy8iu8o
@user-ge2hy8iu8o 2 күн бұрын
Hey Cody, loved your video about your email newsletter app. Did you ever consider trying out FilterBounce for your verification needs? The accuracy they provide leaves other services in the dust, plus they offer 300 free email id verifications each month.
@_free_fire_lovers_
@_free_fire_lovers_ 2 күн бұрын
Just got done watching your latest video on automated email testing, Cody. Ever thought of giving FilterBounce a try? It is damn reliable and the accuracy blows any other verification service out of the water. Plus, they offer a free plan to get started.
@djjiteshwarbhairopur4980
@djjiteshwarbhairopur4980 2 күн бұрын
Good work Cody on your latest video! As for Email Verification, FilterBounce has changed the game for me. I fear it might make some of your testing redundant, they are that good! Affordability is their middle name. Trust me, throw them into your mix.
@Stdanguakoraofficial9061
@Stdanguakoraofficial9061 2 күн бұрын
Yo Cody, amped to see you tackling email verification in your latest. You know what could have saved you a ton of time? FilterBounce. They have an API for contact form verification that is top-notch. Never had a single issue with false positives.
@MystieK_
@MystieK_ 2 күн бұрын
us this any more useful than portainer
@nickolaki
@nickolaki 3 күн бұрын
This is why I use Clerk, they do all this for you. 1min lived tokens
@ashajanet12-a92
@ashajanet12-a92 3 күн бұрын
This is wayy good explanation!🫴✨
@jazzdestructor
@jazzdestructor 3 күн бұрын
Hey Cody just wondering why you are saving refresh token in db, i understood your point for security but couldnt you just encrypt it with a secret on backend ? and put it in httponly cookie? incase of compromise you could just change the secret salt, (this might lead to many other people getting logged out though, but its a very rare case to happen)
@WebDevCody
@WebDevCody 3 күн бұрын
That’s just the common convention many do. Logging everyone out because one key got leaked is enough of an issue to warrant saving each token as a separate revokable thing in a db
@hgeldenhuys
@hgeldenhuys 3 күн бұрын
REMIX REMIX REMIX!!
@nateward7120
@nateward7120 3 күн бұрын
What a great explanation.
@binamralamsal
@binamralamsal 3 күн бұрын
When I first used next-auth, I hated it because of these reasons. I was wondering how everyone is advertising next-auth as a good solution. I am glad I am not the only one who thinks so.
@stephenisienyi7726
@stephenisienyi7726 3 күн бұрын
OMG Sheesh Why?
@dileeshaabilash5562
@dileeshaabilash5562 3 күн бұрын
Thank you Bro Really good❤❤
@tomirodriguez7195
@tomirodriguez7195 3 күн бұрын
As much as I love NextAuth, I always break my head with a wall when I need a more secure way to handle authentication or some extra functionalities. We need so much work arounds to bypass their limitations that your projects turns to an authentication app. I feel like this solutions need so much time and effort to accomplish what prebuilt solutions such as Clerk or Kindle do, that is not worth it. Although they are not totally free, the free tier is more than enough to keep your app running and growing without worrying about this kind of stuff. Once you're near the free tier limit, your app should have more ways to handle the costs of this solution, or you could opt out. I personally prefer to think about those things once I truly spent time developing, rather that overthinking something that blocks the rest of the project. As a side note, when you pay for this solutions you don't only pay for "the user", but the maintenance, the constant updates and security made by a profesional team.
@abhinavadarsh7150
@abhinavadarsh7150 3 күн бұрын
How I would like to do it. /auth/login - issue refresh token and acesss token Store refresh token in cookie and don't store access token at all. /auth/refresh - get new access token using, called on full page reload or if token expire on when client is still on the page. Reduce lifetime of acess token to <5min. How I like to keep track of refresh token? I create a devices table which store the info about user-agent and ip address. I put device id in refresh token. When a request for token refresh is made I check if device exist if yes then return access token.
@euanmorgann
@euanmorgann 3 күн бұрын
I love Next Auth but it is a constant pain when you run into basic things it doesn't support still
@skapator
@skapator 3 күн бұрын
The way you mitigate attack surface, is that whenever the refreshtoken is used it returns a new access token and anew refresh token invalidating the previous refresh token. So effectively if an attacker steals any, next time the real user logs in the attacker has no valid tokens. I think that is the main point of refresh token being a separate http only cookie. It is a single use token. At that point you might as well keep the access token in memory since the absence of it and the presense of a valid refresh token would guarante always being authed. This used to be the most solid solution back in the localStorage days. But I am not really sure why you need to use jwt and not just a session cookie. Not really convinced that the flexibilty exists in next auth. Lucia auth seems more promising but it has no real csrf protection which next-auth has. Really strange that nextjs in general hasn't made that functionality robust since it is nothing new and all other real full stack frameworks have it for years.
@jairseedorf
@jairseedorf 3 күн бұрын
You should check into building your own auth (cognito being the easiest for me) because it gives you way more control with less code. You already know the basics by now so you'll find it much simpler.
@buzz1ebee
@buzz1ebee 3 күн бұрын
I tried using next auth at first and absolutely hated it. Could not get it to consistently refresh tokens across sever components, server actions, client components, etc. As i have a separate backend i switched it up where the backend handles the oauth flow and refreshes tokens automatically. All I need the frontend to do is check the cookie exists. If next Middleware doesn't see the cookie or a fetch returns 401 the user hits the backend /login route. You could almost certainly set that up with route handlers too I imagine.
@kirylchetyrbak6542
@kirylchetyrbak6542 3 күн бұрын
you can blacklist your jwt in redis thereby invalidating it
@WebDevCody
@WebDevCody 3 күн бұрын
Yeah but then you need to lookup the jwt every api call. That kind of defeats the purpose of using a jwt right?
@kirylchetyrbak6542
@kirylchetyrbak6542 3 күн бұрын
@@WebDevCody yeeah, but as far as i know this is the only option. at least redis is fast
@WebDevCody
@WebDevCody 3 күн бұрын
screw this I'm switching back to database strategy. I'm not convinced using jwt strategy isn't worth the hassle when it comes to using next-auth
@darialyphia
@darialyphia 3 күн бұрын
just ditch next-auth KEKW
@toddjudd9552
@toddjudd9552 3 күн бұрын
I'm still not sure what the benefits are to JWT but I just swapped to it because I need to support a Credentials to support something like a yubikey and the credentials providers don't support database sessions... though I don't understand why.
@akramammour6994
@akramammour6994 3 күн бұрын
I would def use if i wanted credentials based strategy i would use lucia
@cas818028
@cas818028 3 күн бұрын
The benefits of the jwt show case themselves when you have large high traffic systems. As one of the main selling points is that don’t need to go to the db every round trip. Everything is encapsulated in the jwt itself. You should only need to hit to the db if you are nearing expiration and need to refresh it using a long lived token
@fxmtoeclipse
@fxmtoeclipse 3 күн бұрын
This very week I had to reimplement our company’s auth because of how bad next-auth v5 is. We went with iron-session and rolled our own, but Lucia auth seems good.
@mithatercan
@mithatercan 3 күн бұрын
Isn't it good to get group membership list and plan in session without adding it to JWT token?
@WebDevCody
@WebDevCody 3 күн бұрын
I guess it’s fine as long as the cookie session is encrypted so that the client can’t modify it
@nickolaykabash1233
@nickolaykabash1233 3 күн бұрын
next and next-auth is a joke, you can use it only for hello world projects. in real world scenario where you need to support auth calls to api both in browser and server its impossible to implement this in next. switched to remix and feeling good
@nickolaki
@nickolaki 3 күн бұрын
This is a skill issue bud.
@cybor-gg
@cybor-gg 2 күн бұрын
@@nickolaki care to elaborate? im evaluating nextauth and lucia but would love to hear your thoughts
@nickolaki
@nickolaki 2 күн бұрын
@@cybor-gg Was just referring to how nickolay has changed framework because of the issues he's been having. I've kept out new upcoming auth tools for some time, lucia for instance. Not a clue, so not going to be much value to you. Clerk has been my goto for about a year and working just fine, have you looked at that?