session-cookies

ASP.NET Core session authentication

梦想与她 提交于 2021-02-08 08:43:19
问题 I'm developing an ASP.NET Core 2.2 web application. I want to store user claims in application memory, not in cookies. I add AddDistributedMemoryCache , AddSession and UseSession as described here, but when page is requested, I still see cookie data sent to server and received from the server. My Startup class: public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } // This method gets called by the

How to delete cookie on codeigniter

纵然是瞬间 提交于 2021-02-07 12:21:59
问题 I don't know how to delete a cookie. I want is when I submit a form. The cookie is also delete. I try the delete_cookie("name") but is not working. I think because the cookie I created by javascript . Please check my code to fix this problem. This is my sample text field: <input name="cargo_no" type="text" class="validate[required]" id="cargonumber" onchange="setCookie('cargonumberC', this.value, 365);"/> and this is the javascript function setCookie(cookieName, cookieValue, nDays) { var

How to delete cookie on codeigniter

依然范特西╮ 提交于 2021-02-07 12:19:59
问题 I don't know how to delete a cookie. I want is when I submit a form. The cookie is also delete. I try the delete_cookie("name") but is not working. I think because the cookie I created by javascript . Please check my code to fix this problem. This is my sample text field: <input name="cargo_no" type="text" class="validate[required]" id="cargonumber" onchange="setCookie('cargonumberC', this.value, 365);"/> and this is the javascript function setCookie(cookieName, cookieValue, nDays) { var

Why is the req.cookies.session undefined? Firebase + Node + express

徘徊边缘 提交于 2021-02-07 10:16:34
问题 I'm trying to assign a generate a session cookie in exchange for the provided ID token. Here are the docs I'm following. Here is my client side sign-in code: firebase.auth().signInWithEmailAndPassword(email, password) .then(function(user) { firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idToken) { return sendToken(idToken); }); }) // .then(() => { // return firebase.auth().signOut(); // }) .then(() => { window.location.assign('/member'); }) .catch(function(error

Why is the req.cookies.session undefined? Firebase + Node + express

ⅰ亾dé卋堺 提交于 2021-02-07 10:16:13
问题 I'm trying to assign a generate a session cookie in exchange for the provided ID token. Here are the docs I'm following. Here is my client side sign-in code: firebase.auth().signInWithEmailAndPassword(email, password) .then(function(user) { firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idToken) { return sendToken(idToken); }); }) // .then(() => { // return firebase.auth().signOut(); // }) .then(() => { window.location.assign('/member'); }) .catch(function(error

how to set the samesite attribute on bm_sv cookie

自闭症网瘾萝莉.ら 提交于 2021-01-29 17:30:49
问题 Found DAST scan error "Cookie Without SameSite Attribute" on Frond end application Front end application build on node js and React js. I can see the cookie are added back in response object in browser. Set-Cookie: bm_sv=fdafdfsdfasffasdfsafsdfsafasffsadffdsfsfasfsdfsfxvxgdhgfwefw; Domain=.xxxxx.co.uk; Path=/; Max-Age=7003; HttpOnly Error clearly showing that it will be clear by adding "Samesite" Attribute in cookie. I used cookie-session node module and added configuration like below. but it

How can I delete the _myapp_session cookie in Google Chrome Storage using a controller in Rails 6?

会有一股神秘感。 提交于 2021-01-29 06:19:19
问题 I'm using Rails 6, Devise for authentication and testing my app on Google Chrome. I can log in successfully. However when the user tries to log out by clicking on the Log Out button, it doesn't log out and only redirects to the home page. I have the application containerised using Docker and Docker Compose and I'm using PostgreSQL for the database, ElasticSearch for search and NGINX for the web server. This appears to be a caching or cookie issue. When I delete the _myapp_session cookie in

Jhipster login / authentication in mobile app

荒凉一梦 提交于 2021-01-29 04:01:50
问题 How to get a session cookie and the CSRF token from jhipster then use them in your calls to the API from mobile app. I am using HTTP session authentication. JHipster configuration, a .yo-rc.json file generated in the root folder { "generator-jhipster": { "jhipsterVersion": "3.0.0", "baseName": "vconnect", "packageName": "com.zenfact.vconnect", "packageFolder": "com/zenfact/vconnect", "serverPort": "8080", "authenticationType": "session", "hibernateCache": "ehcache", "clusteredHttpSession":

How to invalidate all sessions after user log out in Rails?

坚强是说给别人听的谎言 提交于 2021-01-29 03:54:36
问题 I am new to Rails and I am following Michael Hartl's Rails Tutorial, so my code is mostly borrowed from there. Here is the scenario: I log onto my site using Computer A . Then I log onto the site using the same user id using Computer B . When I log out of the site using Computer A , Computer B remains logged in and can still perform actions. For security reasons, I would like Computer B to be forced to login again when Computer A has logged out. Is there an easy way to invalidate all sessions

Get a cookie in Laravel 5 middleware

不羁的心 提交于 2021-01-28 19:26:03
问题 I'm trying to retrieve a cookie from a middleware in Laravel 5.3 but it seems like $request->cookie('language') is empty. I'm guessing that it is only set after the middleware runs. I read somewhere that I should use \Cookie::queued('language'), but it's still empty. Is my only option using the $_COOKIE variable? 回答1: When do you set this cookie? Remember that cookies are stored in the browser, so the user needs to get the response in order for you to be able to retrieve the cookie later. You