@ -10,6 +10,7 @@
"license": "ISC",
"dependencies": {
"axios": "^1.1.3",
"body-parser": "^1.20.1",
"cors": "^2.8.5",
"express": "^4.18.2",
"mysql": "^2.18.1"
@ -11,6 +11,7 @@
@ -1,5 +1,6 @@
import axios from 'axios'
import React, { useState } from 'react';
import CryptoJS from 'crypto-js';
const api = axios.create({
baseURL: 'http://localhost:8080'
@ -16,7 +17,7 @@ function Connexion() {
}
function changePassword(event) {
setPassword(event.target.value);
setPassword(CryptoJS.SHA256(event.target.value).toString(CryptoJS.enc.Hex));
function chechAuth(event) {