Новое в веб-разработке AngularJS. В настоящее время у меня есть приложение, где я должен использовать форму глобальной аутентификации. SPA имеет несколько частичных страниц / просмотров. Для перехода от вкладки к вкладке я использую ngCookies для хранения информации для входа в систему клиента.
If the user refreshes the page, I read the cookies and bring the related information for a given customer.
It is working fine but the problem arises when the user closes the application without clicking the logout button and the cookies remain in the browser.
So, the next time another customer logs onto the site, it reads the old cookies and bring the old customer information instead of currently logged-on user.
function writeLoginCustIDCookie(loginCustID) {
$cookies.put("LoginCustID", loginCustID, { path: '/' });
}
function getLoginCustIDCookie() {
return $cookies.get("LoginCustID");
}
Пожалуйста, помогите мне, как решить эту проблему.