I like your video. It was informative to see how you implemented the solution. Have you considered implementing this without JavaScript? I found that using the svelte fail function from the server actions basically allows me to redirect form data back to a form from the server with additional data. For example, the form starts with one team, but when the user clicks to add a team, the form is submitted with a query of team count +1. The server sees the team count, then returns fail(409, …formData, team count: 2)… on the form, you just have an each block for teams to loop over the number of team forms. It basically adds the additional team for, and will gracefully fail if JS is not enabled. You just include use:enhance on the form. I have found it to be a good way to maintain server-side validations and form responsiveness on multipart forms. On item id’s, just use the each index to differentiate input groups.
@greycode_dev19 күн бұрын
The video was very helpful. I have noticed that you used express but seems like you have used a boilerplate that already had cors and other staff setup for you already, if soo can you please the name of it soo that i also look into it?
@sdavidpringle19 күн бұрын
How can Google access the 'localhost' domain on your computer?
@yannisgoogleapps924920 күн бұрын
That was a good video, thanks!
@bigbadcatbigbcy293326 күн бұрын
It was a great tutorial thanks
@dinizecАй бұрын
cool vid, but slugs are molluscs
@nuvotion-liveАй бұрын
Wow so easy. Thanks
@justin8muxАй бұрын
Thanks man! You gave me hope for tomorrow, to fix OAuth2 flow in my project :)
@storyzcreatorАй бұрын
why wouldn't we need the csrf verification when we go the js callback route that give us the credentials? How is the csrf taken care of then?
@gabrielcastillo1454Ай бұрын
I have a WARM "WARN DNS checks failed" :(
@dannyzhang2371Ай бұрын
Hi! Just in case you read this, can you help me? I added a catch (error) to the +page.server.ts of the login page, and whenever I try logging in, I get that error message. Not really sure what's going wrong. Link to repo: github.com/jay-marvel/website
@mitchm75212 ай бұрын
its actually not clean coded in my opinion
@prajwaltulawe67252 ай бұрын
Update : In getUserData function in the url add "=" after access_token Eg: /userinfo?access_token=${access_token} Don't know if anyone else faceed this problem, but in my case i required this modification.
@shainemamigo71332 ай бұрын
Thank you so much
@abdiastar64512 ай бұрын
why is it borderline impossible to send the token in a cookie to the frontend? im so close to breaking my laptop rn
@rezhabahari2 ай бұрын
on the video min 5.25 , you cant set cookie on a cross origin basis. ive once tried, and it worked, but it is buggy and requires a bit of tinkering on the backend side
@abdiastar64512 ай бұрын
@@rezhabahari what exactly did you do to fix it? can you walk me through it?
@rezhabahari2 ай бұрын
@@abdiastar6451 app.set("trust proxy", 1); Mind you, It was buggy
@threalinsideout13682 ай бұрын
Does this apply to sveltekit 5, and as well. How do you save it and maintain the same operation after "build" especially when its on a server like vercel.
@zuzukouzina-original2 ай бұрын
Sveltekit should run in a protected environment with ssl and the connection with pocketbase also with ssl, pocketbase already does the job for hashing the password. So this is adding unnecessary complexity. Nowadays you can’t run websites without ssl 🤷🏻♂️
@jinamsancheti22123 ай бұрын
How can i fetch users data after they have logged in, in my react app?
@DenysBabych3 ай бұрын
great video, but how i can send a json response with the user on front end if i'm redirecting in oauth get route?
@colinm9903 ай бұрын
The reloads all 200 records each time a single record is added..
@BramDeJaegher3 ай бұрын
Can you please comment on the security of this approach. Is this setup not vulnerable for CSFR?
@d424 ай бұрын
i watched the previous oauth google + sveltekit tutorial and now this one. thanks, but you kind of skipped over where you got the JWT key and installing jsonwebtoken.
@gulshankumarthakur81934 ай бұрын
Email verification is incomplete without FilterBounce. Their API for contact form verification is a lifesaver. Trust me, you would not be disappointed with the accuracy!
@rejaulsk29194 ай бұрын
I was blown away by the accuracy of FilterBounce compared to other email verification tools. My email marketing efforts have been elevated since using FilterBounce. Try it out now!
@aniketgemar4254 ай бұрын
Stop wasting leads with unreliable email verification tools. FilterBounce is the real deal - accurate, affordable, and easy to use. Give it a try and see the difference!
@mrsumonbhaijaan58894 ай бұрын
I used to struggle with inaccurate email verification tools until I discovered FilterBounce. Now my bounce rate is under 1% and my email reputation is pristine. cannot recommend it enough!
@RamchandTakia4 ай бұрын
Started with FilterBounce is free plan and was amazed by the accuracy and efficiency. Now I use their API for all my contact form verifications. FilterBounce is truly a cut above the rest!
@Edgar-pu1lc4 ай бұрын
What about github oauth ? Can you make a video about that one ?
@RitikRaj-we2sc4 ай бұрын
Hey I have implemented google auth using passportjs. Now, locally it's working fine, but after I deployed it to vercel, then ven though consent screen is shown, I am not getting back the cookie, and therefore use is not getting authenticated. Please tell me what could I be doing wrong. I am stuck on this for more than two days.
@ismaelpaul3674 ай бұрын
If you are hosting client and server with different domains, the cookies won't work as you can't exchange cookies cross domain. I am having the same problem.
@RitikRaj-we2sc4 ай бұрын
@@ismaelpaul367 hey I got the solution. You just need to add this line to your code to make it work. app.enable("trust proxy")
@ozgurNY4 ай бұрын
I prefer svelte-routing. SvelteKit doesn't make sense
@laurafalcon57414 ай бұрын
What cookie library did you use? I tried with cookie-parser but they were never sent to my client side :( I don't know why
@abdiastar64512 ай бұрын
im having the same issue, cookies are not getting sent to my frontend either
@laurafalcon57412 ай бұрын
@@abdiastar6451 I didn't resolve my problem at that time, but I researched it, and the frontend and backend must be hosted on the same domain. Sorry for my English.
@CasualVloggingGoneSerious4 ай бұрын
I can totally agree, google's documentation is the worst!
@Alchemist_dream4 ай бұрын
i got those info , but since im in a redirect url , how am i suppose to set cookie inside browser , i got stuck there , i cannot send those info or token in front , i saved it in data base , but again i don't have a unique identifier to find that user , i just stuck with those info in redirect url , two days and i haven't find a solution ,
@alenaju18474 ай бұрын
send your github url
@VanderleiRobertoMoretto5 ай бұрын
Not Svelte! Is Sveltkit !
@tedspens5 ай бұрын
Camelcase for variables, lowercase for form values, but that's just me. Almost a year old and this is still the best SvelteKit JWT tut on youtube, along with the Authentication video. Just stopping by for a refresher. Thanks!
@FutureMind3235 ай бұрын
Thank you for the insightful video. I have a query regarding the implementation of complete authentication, this is for both sign-in and sign-up functionalities. What steps should I take after this? Should I opt for JWT implementation, utilize sessions, or consider other options?
@techidea36015 ай бұрын
why when i logout and login again and it get 500 error code? tysm
@renjuag82795 ай бұрын
Thanks for the video. Once the authentication is successful, google redirects the flow back to the application with the 'signin-google' route.But im getting 500 Internal Server error and the request fails every time.
@dhanujayayapabandara3843 ай бұрын
Did you do successfully this task
@RamBadrinathReddy5 ай бұрын
hey i did the google login just like you explained and i am getting the most part except for the users actual data in the final reaponse in the oauth.js file do you have any idea about why that is happening this is the data object i recieved to my /oauth route data: { error: 'invalid_request', error_description: 'Invalid Credentials' } if anyone knows the solution please help
@RamBadrinathReddy5 ай бұрын
i also did not get a refresh token as well
@ConsultingNinja5 ай бұрын
Check your email
@stephanieeaton4495 ай бұрын
Love this! Awesome tutorial and easy for dummies like me. :) The only thing I wanted to point out is, that I do not believe/I am unsure if the video explains how to redirect the user back to the original page after the completion of oauth. I got stuck in a "forever loop" after the ouath until I added res.redirect(303, 'localhost:5173/'); at the end of the oauth/ end point. I managed to find the solution by looking at the source code you provided. If it's missing from the video, are you able to add a note? Or am I just blind? Otherwise, thank you!!!!!!!!!1
@32srajanr395 ай бұрын
It works on localhost, but fails in live site, i have added live site link also live site backend route to credentials, i am getting invalid_grant error when i try from live site after the user selects the account
@ConsultingNinja5 ай бұрын
This is most likely because there are pretty tight restrictions to using this in "testing" mode You have to publish your app in order to use in hosted domains. Go to my website : www.consultingninja.tech/ and use the contact form to send me a message with your email. I will send some screenshots to guide you. Sorry for the delay I didn't see this.
@fcnealvillangca79436 ай бұрын
how to do it with cropping image and send the crop image to form action? :)
@ardiansyahrukua30206 ай бұрын
if you store it in cookie then you need csrf token to prevent unwanted request, am i right ?
@sirdadislickback6 ай бұрын
Would the “/“ path be protected under this user login or would one have to use a page.server.ts or a hooks.server.ts to check if the user is 1. Not using a stale session or 2. Directly trying to access the url by manually typing it
@thecoffeejesus6 ай бұрын
This is exactly what I needed. Thank you so very much
@ConsultingNinja6 ай бұрын
Oh good, I am so glad it helped you!
@basithp94676 ай бұрын
Please do a video on Google Sign in using Flutter and NodeJs
@ConsultingNinja6 ай бұрын
I can add that one to the list.
@LaLaPaPa6 ай бұрын
Thanks for the great video. I was wondering what Tigrus is all about and how to use it.
@ConsultingNinja6 ай бұрын
Glad it was helpful!
@miftakhussururalmaliki69296 ай бұрын
i exactly do like on the video but there is an error Error: EISDIR: illegal operation on a directory, open 'static/' and import fs now from fs/promise not fs.promise import fs from 'fs/promises'
@ConsultingNinja6 ай бұрын
EISDIR error means that you are trying to do something on a file that is a directory. I also think you may be using the wrong fs. The package you install should be fs.promises with an (s) at the end. There are also issues when trying to use this with older versions of Node so be sure to update your Node as well.
@swagz64406 ай бұрын
I am being returned the error: "{ error: 'invalid_request', error_description: 'Invalid Credentials' }" even though i console.logged the user being requested and i got the access token, refresh token and everything
@ConsultingNinja6 ай бұрын
Try the following: Go to console.developers.google.com/ Select your project. Click 'APIs & auth' Make sure your scope includes "email" and "profile" Wait 10 minutes.
@swagz64406 ай бұрын
@@ConsultingNinjaThank you however I fixed it in the url I added an = after the ?access_token