Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evently events platform. Can't get mongoDB and Clerk connection working #103

Open
alexeerma opened this issue Dec 27, 2023 · 21 comments
Open

Comments

@alexeerma
Copy link

Hello!

I have a problem, getting the MongoDB and Clerk connection working. As I create my user after deploying it on Vercel then in Clerk I can see the User under Users tab, but it does not show in the MongoDB collections. Also all the webhook message/event types show failed. I went over the secrets and everything multiple times, but still can't figure out the problem. When creating the new endpoint on Clerk I get the WEBHOOK_SECRET but after adding the new environment variable on Vercel I have to redeploy the app, but then the endpoint for the webhook changes..Might that be the problem? Any ideas?

@athishsn
Copy link

athishsn commented Jan 6, 2024

even i got stuck in the same situation, did you solve this? if yes, please share me how

@kotysky
Copy link

kotysky commented Jan 7, 2024

Same here!

@kotysky
Copy link

kotysky commented Jan 7, 2024

please ,check if the middleware.ts is the same in this link.

could be a problem with the public routes.

https://clerk.com/docs/users/sync-data

@kotysky
Copy link

kotysky commented Jan 9, 2024

this works for me!

@Ziad-Al
hace 2 semanas
​ @Jediknightcode I solved it by going to clerk dashboard, user&authentication, email,phone, username then I clicked on the setting icon beside Username and allowed the username required, then I did the same for the Personal information I allowed the first name and last name to be required, I guess by doing this the setting in clerk dashboard is aligned with the user model we created where these info are required for the user object to be created inside the database collection

@mustafakba
Copy link

Sorry but this is not working for me.
Has anyone solved the problem?

@kotysky
Copy link

kotysky commented Jan 10, 2024

Man,I solved the problem, please go to the video comments , and down there, look for the comment and You can see what I am telling to you, what I did different is in Vercel I disabled all the security requirements in security menu, I hope this can help to you.

@alexeerma
Copy link
Author

Still is not working for me, found the same answer, but after doing that and redoing all the steps, still can not get this to work..

@athishsn
Copy link

athishsn commented Jan 10, 2024 via email

@alexeerma
Copy link
Author

Hey! I still haven't I tried all of the above. Replaced files from the course repository, but that didn't work.

@Sethuramalingam-art
Copy link

Please help me also I can't able to fix. I tired more!

@sachinmaurya1
Copy link

hey guys same problem , my user is visible on clerk after sign up but unable to get in mongodb can anyone please guide ?

@hadcod3
Copy link

hadcod3 commented Mar 1, 2024

#103 (comment)

Hey guys, i have same problem and i have solved it, i just add ip address (0.0.0.0/0) as universal ip or make sure use current your ip address

@AlbinSony
Copy link

Man,I solved the problem, please go to the video comments , and down there, look for the comment and You can see what I am telling to you, what I did different is in Vercel I disabled all the security requirements in security menu, I hope this can help to you.

Is there any way I can contact you brother directly

@Flasky06
Copy link

Flasky06 commented Apr 5, 2024

Hello am experiencing

Man,I solved the problem, please go to the video comments , and down there, look for the comment and You can see what I am telling to you, what I did different is in Vercel I disabled all the security requirements in security menu, I hope this can help to you.

Is there any way I can contact you brother directly

@Flasky06
Copy link

Flasky06 commented Apr 5, 2024

Hello did you solve the problem

@gokusabu
Copy link

gokusabu commented Apr 5, 2024

Hello did you solve the problem

go to network access in the mongodb database settings and try editing the ip address to 0.0.0.0/0

@HosniHazem
Copy link

Guys i fixed by simply removing "/api/webhook/clerk" from ignoredRoutes in middleware.ts.

@Aung-IO
Copy link

Aung-IO commented Apr 16, 2024

I manually create a user for only testing purpose because I stuck the whole day.
_id
clerkId : " " (you can get all from clerk - user -view profile)
email
username
firstName
lastName
photo

by doing this, u can move to next steps. If I find another way I will comment later.. thanks

@Pratik-003
Copy link

Guys i fixed by simply removing "/api/webhook/clerk" from ignoredRoutes in middleware.ts.

bro can u help me i am not able to connect with my database can u help me please

@Pratik-003
Copy link

I manually create a user for only testing purpose because I stuck the whole day. _id clerkId : " " (you can get all from clerk - user -view profile) email username firstName lastName photo

by doing this, u can move to next steps. If I find another way I will comment later.. thanks

bro can u help me how to do this

@DanyGlez94
Copy link

I was able to create users and sync them to Mongo when login with github or google, but I had a problem when trying to register with an email. I founded out the solution, you need to go to your clerk dashboard, then to User & Authentication and make sure username is set to be required, the same with email and password, then, under personal information is little tricky, you need to toggle Name switch to the right and then click on the config icon on the right, it will open a modal where you need to specify name to be required, this is in order to be aligned to the schema model. This will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

15 participants