Skip to content

Commit 9ec2671

Browse files
committed
change domain
1 parent ff99ebd commit 9ec2671

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: react-frontend/src/components/Login.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ const Login = () => {
4747
.then(function (response) {
4848
// handle success
4949
setLoading(false);
50-
console.log("RESPONSE login:",response)
50+
console.log("ReSPONSE login:",response)
5151
setMessage(response?.data?.message);
5252
openSnackbar(response?.data?.message);
5353
localStorage.setItem("user", JSON.stringify(response?.data?.user));
5454
console.log("Setting in local storage in signin" ,response?.data?.message);
5555

56-
const domain = "api.ayushsharma.co.in";
56+
const domain = ".ayushsharma.co.in"
5757

58-
document.cookie = "jwt=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
58+
// document.cookie = "jwt=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
5959

6060
const jwt = response.data.cookie;
6161
document.cookie = `jwt=${JSON.stringify(jwt.value)}; SameSite=Strict; path=/; domain=${domain}`;

Diff for: react-frontend/src/components/register.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const Register = () => {
5151
console.log("LOGGING JWT")
5252
console.log("JWT :" ,jwt)
5353

54-
const domain = "api.ayushsharma.co.in";
54+
const domain = ".ayushsharma.co.in"
5555
document.cookie = `jwt=${JSON.stringify(jwt.value)}; SameSite=Strict; path=/; domain=${domain}`;
5656

5757
setMessage(response?.data?.message);

0 commit comments

Comments
 (0)