baradev / saas-platform

full stack AI saas platform
https://saas-platform-ten.vercel.app
2 stars 1 forks source link

Did you have issues with mongoDB connecting, and getting clerk webhooks to sync? Many thanks. #1

Open rayne1066 opened 3 months ago

rayne1066 commented 3 months ago

Hi! I see that you have very successfully updated the Saas Full Stack project for clerk v5. Thank you so much for making this project public, this has saved me a great deal of time. I am a novice developer and still learning the ropes. I forked your repo, to see if I could get this to work, and I am still having major issues with throwing (User Not Found errors, in my development server. If you have some thoughts on how I might rectify this, it is driving me up the wall. I would be very grateful. I live in NZ as well, so it would be nice to solve this locally :) The main issues I think that I have narrowed it down to is I get a 200 code on my terminal, when clerk loads. However, I dont think the Clerk Webbook is activating, I ran another tutorial for v5 direct from the Clerk SDK template, and they use ngork for dev, I got it to work in this implementation, but not with this project. Did you ever run into anything similar? My mongoDB is not updating, the only time I have gotten anything to work is when I login in with github in my clerk server, on this only it creates one user with the write info, but then no additional users are generated. For that single instance, the clerk webhook marks as success. If you have any thoughts I would be so grateful. for the record me .env.local is

NEXT

NEXT_PUBLIC_SERVER_URL= "https://saas-platform-seven.vercel.app/"

MONGODB

MONGODB_URL= "mongodb+srv://admin:@cluster0.3bbawa4.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"

CLERK

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="xxx" CLERK_SECRET_KEY="sk_test_xxx" WEBHOOK_SECRET= "whsec_xxx"

NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/ NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/

CLOUDINARY

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME= "xxx" CLOUDINARY_API_KEY= "xxxx" CLOUDINARY_API_SECRET= "xxx"

STRIPE

STRIPE_SECRET_KEY= "sk_test_5xxx" STRIPE_WEBHOOK_SECRET= "whsec_xxx" NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= "pk_test_51ObPNIS9JcmrlHfBd798ZMc5snLdcUNAuvs1ZUxk1lp15gj1bft0jJIDXvFVfDCcoc47ZV8mW1uVW2YNyrtcshtw001kagYw7G"

afzal442 commented 1 month ago

hi @rayne1066 did you configure username as well? image

And did you setup your app on vercel.app? you have to specify your link here NEXT_PUBLIC_SERVER_URL?