File tree 2 files changed +4
-4
lines changed
react-frontend/src/components
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ const Login = () => {
47
47
. then ( function ( response ) {
48
48
// handle success
49
49
setLoading ( false ) ;
50
- console . log ( "RESPONSE login:" , response )
50
+ console . log ( "ReSPONSE login:" , response )
51
51
setMessage ( response ?. data ?. message ) ;
52
52
openSnackbar ( response ?. data ?. message ) ;
53
53
localStorage . setItem ( "user" , JSON . stringify ( response ?. data ?. user ) ) ;
54
54
console . log ( "Setting in local storage in signin" , response ?. data ?. message ) ;
55
55
56
- const domain = "api .ayushsharma.co.in" ;
56
+ const domain = ".ayushsharma.co.in"
57
57
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=/;";
59
59
60
60
const jwt = response . data . cookie ;
61
61
document . cookie = `jwt=${ JSON . stringify ( jwt . value ) } ; SameSite=Strict; path=/; domain=${ domain } ` ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const Register = () => {
51
51
console . log ( "LOGGING JWT" )
52
52
console . log ( "JWT :" , jwt )
53
53
54
- const domain = "api .ayushsharma.co.in" ;
54
+ const domain = ".ayushsharma.co.in"
55
55
document . cookie = `jwt=${ JSON . stringify ( jwt . value ) } ; SameSite=Strict; path=/; domain=${ domain } ` ;
56
56
57
57
setMessage ( response ?. data ?. message ) ;
You can’t perform that action at this time.
0 commit comments