Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

358
Views
cookies do set on localhost, but once I deploy cookies don't set in a browser. No errors in network. Providing git and url

The problem is described in a title. Cookies don't want to set. Even tho I'm checking protocol there is no errors and looks good to me. I did try a different variety on sending cookies, but had no luck. App is super easy, registration happens only by entering login. No password. Please check if it works for you. Also files are well structured in app: server -> index (initialization of axios). controllers -> userController (that's where all cookies are sent)

front server file:

import axios from "axios";

import { addError } from "../store/errorSlice/errorSlice";

let store:any;

const injectStore = (_store:any) => store = _store;


const instance = axios.create({
    timeout: 1000,
    withCredentials: true,
    baseURL: "https://soccer2021sf.herokuapp.com"
    // baseURL: "http://localhost:8000"
    
})

instance.interceptors.response.use(response => response,
   function (error) {
        const { data, status } = error.response;
        const { message } = data;
        console.log(data, status, message, "ERROR CONSOLE")
        store.dispatch(addError({ message, status, active: true }))
        return Promise.reject(error);
})

export { injectStore };
export default instance;

back cookies send like:

res.cookie("userSF", user, { maxAge: 3000 * 24 * 60 * 60 * 1000, httpOnly: false, sameSite: "None", secure: true })

full source of code: front: https://github.com/Deanexx/fotball_2021/tree/main/src

back: https://github.com/Deanexx/back2021Soccer

app url: https://soccer2021front.herokuapp.com/

http protocol

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!