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

How add login credentials #5

Open
josephjosedev opened this issue Nov 1, 2021 · 4 comments
Open

How add login credentials #5

josephjosedev opened this issue Nov 1, 2021 · 4 comments

Comments

@josephjosedev
Copy link

hi how to add login credentials

@adarshaacharya
Copy link
Owner

adarshaacharya commented Nov 1, 2021

@josephjosedev do you mean login credentials for running locally or using hosted version of app at
https://e-complaints.herokuapp.com/ ?

@josephjosedev
Copy link
Author

locally ,here we can only see login option

@adarshaacharya
Copy link
Owner

@josephjosedev unfortunaetly i manually insert one initial admin data into database, and add another afterwards. It's my old project so ..

@adarshaacharya
Copy link
Owner

what you can do is manually do so, as i 'm using bcrypt library with round 10. you can manually put console after this line
here is the code

const salt = await bcrypt.genSalt(10)
  const hashedPassword = await bcrypt.hash(user.password, salt)

console.log(hashedPassword) // put this 

so that it will display hashedpassword and put that password manually in the database. Once you create one admin other admin can be created after wards. I hope you get it, please let me know if you need futher help.

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

2 participants