I have a website that asks notification permission from user during log-in. I have a code there that auto-logouts the user when he/she denies the permission (see the codes below)
//Checks if user browsers notification is "Allowed", if "denied", logs out user
if(Notification.permission == 'denied') {
removeAllCookies($cookies);
$location.path("/login");
}
That code seems ok at first but just today it started malfunctioning. All new users auto-logouts even if they haven't configured the permission yet.
I even tried to check the permission manually at the favicon at the left of address bar and I can see that it is still set to ask(default). I also tried to manually set it to Allow yet the Notification.permission function still returns denied. What's causing this? It is ok in my pc but in all other users it auto-blocks.
EDIT: Just now I'm already experiencing the same thing on my PC. My Notification permission is Allowed but Notification.permission always return denied. I console logged it and it really does return denied. Anyone?