Category : cookies

I am not able to get cookies. abc.subdomain1.xyz xyz.subdomain2.xyz here are the two subdomain My laravel project is in abc.subdomain1.xyz here is my Middleware/EncryptCookies.php file protected $except = [ ‘shared’ ]; here is my Cookie Cookie::queue(‘shared’, ‘share’, ’60’, null, ‘.domain.xyz’); return Redirect::to(‘http://abc.subdomain2.xyz/check/’.$uid); I want to share cookies from abc.subdomain1.xyz domain to xyz.subdomain2.xyz and getting cookies ..

Read more

I’m on Laravel 7 .env SESSION_DOMAIN= SESSION_SECURE_COOKIE=true SESSION_HTTP_ONLY=true SESSION_SAME_SITE=strict cat config/session.php <?php use IlluminateSupportStr; return [ /* |————————————————————————– | Default Session Driver |————————————————————————– | | This option controls the default session "driver" that will be used on | requests. By default, we will use the lightweight native driver but | you may specify any of ..

Read more

I’m having an issue removing a cookie in laravel. I set the cookie at login as ‘sessionToken’ and once the user logs out I flush the session, update sessionToken column to null, and forget the cookie. Yet, I can still see the cookie when I use "document.cookie" in the browser console. How can I destroy ..

Read more

We’ve a Laravel project which handles logic of the website we’re working on, and completely separated React ptoject (using create-react-app) for our website’s ui. We also installed laravel-sanctum for stateful authentication using cookies. Laravel project is served on my PC and all of local computers can access that using my local machine IP address. So ..

Read more

I want to count the number of cookie ‘cart’ like this code, but the type is string: if(Cookie::get(‘cart’)){ $carts = Crypt::decrypt(Cookie::get(‘cart’), false); if($carts) { $carts_qty = count($carts); View::share(‘carts_qty’, $carts_qty); } } And it throws Exception: count(): Parameter must be an array or an object that implements Countable Sourc..

Read more

In my Laravel application, I am trying to look at ways of passing data back and forth between javascript and the view, this lead me to create a cookie like below: View: @push(‘scripts’) <script src="{{ asset(‘js/cookie.js’) }}" type="text/javascript"></script> @endpush //Now we are further down in the view: <div class="cookie" load="cookie(this)"> Cookie Display:<br> {{cookie(‘test’)}} //this is ..

Read more

For the purpose of a project, I need to identify automatically customers from mainsite.com on partnersite.com whithout any interaction from the customer, and whithout any parameters provided by partnersite.com as it should be almost plug-and-play for partnersite.com (so, no SSO). And, once identified, I should be able to interact with the customer, so with the ..

Read more

I’m trying to connect my angular-app to my Laravel 7 using Sanctum. The backend is running in a wamp virtualhost calls (pruebas.test) and the config is like that: .env: APP_URL=http://pruebas.test SESSION_DOMAIN=pruebas.test SANCTUM_STATEFUL_DOMAINS=localhost:4300 config/cors.php paths’ => [ ‘api/*’, ‘/login’, ‘/logout’, ‘/sanctum/csrf-cookie’ ], ‘supports_credentials’ => true, config/session.php (now is same_site equals none but I tried with lax, ..

Read more