I am trying to use the plugin: https://github.com/Vheissu/aurelia-cookie to set cookies if a user successfully logs in.
My code:
AureliaCookie.set( 'name', 'value', {
expiry: '24h',
domain: 'http://[ip address]',
path: '/',
secure: false,
REMOTE_USER: data.username,
});
When I check the application tab in Chrome DevTools, there is no cookie set there for me to read.
So I tried setting the cookie via perl, which is my ajax login script, which comes from a different web server.
That code:
my $cookie = $cgi->cookie( -name => 'ARIS',
-value => 'REMOTE_USER=' . $validUser,
-expires => '+24h',
'SameSite' => 'None',
-path => 'http://[ip address]/' );
I have to set SameSite, or I get the SameSite cookie error, and no cookie is set.
However, once I do that, the domain is set to [login webserver ip address] and not my actual domain that I am running Aurelia from.
My question:
Is there a way to read the cookie that I have set via perl, or is there a plugin that actually works to set and read cookies from in Aurelia?
Thanks