Open Pannu786 opened 11 months ago
What error exactly are you facing? Can you share the shots?
What error exactly are you facing? Can you share the shots?
That's the thing I'm not getting any errors. all is working fine except for the backend. I am not able to see my data in cluster inside mongoDB.
What error exactly are you facing? Can you share the shots?
That's the thing I'm not getting any errors. all is working fine except for the backend. I am not able to see my data in cluster inside mongoDB.
can you share your route file in [...nextauth] folder? However make sure in your route file you are using "callbacks" and not "callback" and keep in mind that the match used in the video does not allow other user to sign in once their name have more than one space in between their name, to avoid the validation error make sure to change from "username: profile.name.replace(" ", "").toLowerCase()" to "username: profile.name.replace(/ /g, "").toLowerCase()"
Look around the red marked area
Don't hesitate to ask further info once you won't understand or solve your bug.
What error exactly are you facing? Can you share the shots?
That's the thing I'm not getting any errors. all is working fine except for the backend. I am not able to see my data in cluster inside mongoDB.
Don't hesitate to ask further info once you won't understand or solve your bug.
What error exactly are you facing? Can you share the shots?
That's the thing I'm not getting any errors. all is working fine except for the backend. I am not able to see my data in the cluster inside MongoDB.
Hey @honxsinatra . I hope you are doing great. I have tried exactly what you mentioned me above. Unfortunately, it doesn't seem to work for me. My main issue is my backend doesn't seem to connect with the frontend thus no user data is getting saved in the database maybe it has something to do with the cluster which I am not able to fix. My works fine without adding "s" on callback but when I added "s" it broke and told me "access dined". I have attached the file shots you asked for. Please have a look once you have time. I appreciate your help tho.
here the app is working all right without adding "s" but is not able to communicate with the backend and the user data is not stored in the mangoDB database.
here app breaks down when adding "s" with a callback
route file shot-1
route file shot-2
user file shot-1
user file shot-2
database file
I am aware .eve file should be kept secret lol but since this is not a real project I don't mind sharing it here ..
here is the cluster which seems to be created successfully and all but not getting any data in..
hello @Pannu786 , I am really sorry for the challenge you have faced, the problem of access denied is always coming from the username requirements, that's the username you are trying to sign in with does not meet therequirement of match so try the following match and replace it to your match from "user.js" file;
match: [ /^(?=[a-zA-Z0-9\s()]{6,25}$)(?![.])(?!.*[.]{2})[a-zA-Z0-9\s()]+(?<![_.])$/, "Username invalid, it should contain 6-25 alphanumeric letters and be unique!", ]
See the short below
@Pannu786 The global match above allows any username to be valid. You can customize it, but the more you specify, the more usernames you exclude.
Don't hesitate to reach me out if it won't work
/^(?=[a-zA-Z0-9\s()]{6,25}$)(?![.])(?!.*[.]{2})[a-zA-Z0-9\s()]+(?<![_.])$/, "Username invalid, it should contain 6-25 alphanumeric letters and be unique!", ]
Sorry, but It still doesn't seem to work for me. When I remove "s" from the "callbacks" the app runs without any issues and I can sign in easily. I just want the mangoDB cluster to work and store the user data.
any other tips you have that I should try? @honxsinatra
When you remove the 's' from 'callback', the code inside the sign-in function will not be executed. Therefore, you need to use 'callbacks' instead of 'callback'. However, to address your issue, please share the error you encounter when using 's'. Providing a screenshot would be greatly appreciated.
any other tips you have that I should try? @honxsinatra
any other tips you have that I should try? @honxsinatra
Did you try removing <> this bracket from your password in mongodbUri i think bracket should not be included , also i am stuck in same situation where adding s to callback login works and cluster is not saving the login information
@divyanshucode thanks alot bro i was stuck on for hrs , but finally this worked on lol.
I have tried everything. Even looked into the other solved solutions but nothing seems to work for me,