Calling Developers!
We are reenergizing our code contribution process! Learn More

All routes redirected me to /login route

Options
M.abdallah
M.abdallah Senior backend developer Posts: 12 🧑🏻‍🚀 - Cadet

Following the upgrade to the latest version of the B2B demo shop in 202311, every route redirects to the login route, subsequently resulting in an ERR_TOO_MANY_REDIRECTS error. Additionally, I am unable to access any pages while in anonymous mode.

Tagged:

Answers

  • domagoj.krizanec
    domagoj.krizanec Spryker Technology Partner Posts: 9 🧑🏻‍🚀 - Cadet
    Options

    Hello. I didn't have that exact error, but something similar where after the upgrade when I would login and after that add something to cart, I would be redirected to the homepage and I would be logged out. For me, the problem was the max-age option that was added to the HTTP request in the config file. After I removed the option, everything started to work again es expected. I'm not sure if this is the problem also on your side, but it's worth to try.

    $config[HttpConstants::YVES_HTTP_CACHE_CONTROL_CONFIG] = [ 'public' => true,
    'max-age' => 3600,];

  • M.abdallah
    M.abdallah Senior backend developer Posts: 12 🧑🏻‍🚀 - Cadet
    edited March 17
    Options

    I think this is not my case unfortunately

    because all routes redirect to log-in automatically and at the end gives me 502 error

  • M.abdallah
    M.abdallah Senior backend developer Posts: 12 🧑🏻‍🚀 - Cadet
    edited March 17
    Options

    The issue with CustomerPage module when registering customer page security plugins it gives me an exception regarding anonymous auth entry

    Spryker\Shared\Security\Exception\AuthenticationEntryNotRegisteredException - Authentication entry `anonymous` is not registered.

  • M.abdallah
    M.abdallah Senior backend developer Posts: 12 🧑🏻‍🚀 - Cadet
    Options

    When I register those 2 deprecated plugins

    AgentPageSecurityPlugin(),CustomerPageSecurityPlugin(),

    it gives me the above error, But If I register the new plugins it will cause too many redirects issue

    YvesAgentPageSecurityPlugin,YvesCustomerPageSecurityPlugin