Skip to content

Commit

Permalink
forget password issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ydahal1 committed May 6, 2021
1 parent da81dd6 commit 36a1110
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 178 deletions.
43 changes: 0 additions & 43 deletions client-reactjs/src/components/login/ForgotPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,49 +26,6 @@ class ForgotPassword extends React.Component {
this.setState({ [name]: value });
}

// handleSubmit = (e) => {
// e.preventDefault();
// this.setState({ submitted: true });
// if(this.state.email) {
// this.setState({sendingEmail: true})
// fetch('/api/user/forgot-password', {
// method: 'post',
// headers: {
// 'Accept': 'application/json',
// 'Content-Type': 'application/json'
// },
// body: JSON.stringify({ email: this.state.email })
// }).then(response => {
// console.log(response , "<<<< response")

// message.config({top:110})
// if(response.ok) {
// this.setState({sendingEmail: false})
// response.text().then(text => {
// console.log("message: "+text);
// this.setState({success : true, submitted: false})
// //message.error(JSON.parse(text).errors[0]);
// // setTimeout(() => {
// // window.location = JSON.parse(text).resetUrl;
// // }, 1000);
// }
// )

// }
// // else {

// // response.text().then(text => console.log("Error >>>>" , text, text.errors))
// // // this.setState({sendingEmail: false, submitted: false})
// // // message.error("There was a problem sending the password reset instructions")
// // }
// }
// ).catch(error => {

// });
// }
// }


handleSubmit = (e) => {
e.preventDefault();
if(!this.state.email){
Expand Down
129 changes: 1 addition & 128 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{
"devDependencies": {
"chalk": "^4.1.1"
}
}
{}
1 change: 0 additions & 1 deletion server/routes/user/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { body, query, check, validationResult } = require('express-validator');
const errorFormatter = ({ location, msg, param, value, nestedErrors }) => {
return `${msg}`;
};
const chalk = require("chalk");
const jwt = require('jsonwebtoken');
const { JsonWebTokenError } = require('jsonwebtoken');
// routes
Expand Down
1 change: 0 additions & 1 deletion server/routes/user/userservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ let User = models.user;
const Sequelize = require('sequelize');
let UserApplication = models.user_application;
const authServiceUtil = require('../../utils/auth-service-utils');
const chalk = require("chalk")

async function authenticate(req, res, { username, password }) {
var authServiceUrl = process.env.AUTH_SERVICE_URL + '/login';
Expand Down

0 comments on commit 36a1110

Please sign in to comment.