Logout all tabs and if you logout in one tab it needs to be logged out automatically in all other tabs - gmail

We are opening Gmail in two tabs and if you logout in one tab it needs to be logged out automatically in all other tabs

It gets automatically logged out from the other tabs as well if you logout in one tab. If you're NOT getting logged out, try refreshing the page.

Related

Facebook 'Continue' button misplaced in Chrome Extension oauth popup

I'm using chrome.identity.launchWebAuthFlow to start the login flow and when the user oauths with Facebook, the bottom 'Continue' button is partially out of the view. When the user has to enter an email and password for the first time, it's fine, but when Facebook asks only for the password the next time, the issue occurs. Also on the 'Forgotten you password?' page.
Since chrome.identity.launchWebAuthFlow doesn't allow to set size, and resizing the window manually moves the button, but at the same misplaced position, I see it as a clear sign that it's Facebook's code or the chrome.identity.launchWebAuthFlow's window's quirk.
When opening up the same auth url in a real browser window, the button is placed at the right place.
Anyone else came across this issue? Is there any good workaround?

How to open incognito window using extension when user clicks a button on a webpage

I'm working on creating a voting site of some sorts. There will be a laptop at a physical location at my school and one of the pain points I need to solve is that since my site uses sign in with google, it becomes a hassle to sign everyone out and let the next person sign in, so I thought of opening an incognito tab to store session data when someone wants to vote, so that they just need to close the tab to clear their session data. I know that only an extension is allowed to open incognito tabs, and it would require the "tabs" permission, but how would I go about making it so that when someone clicks on the button on my site, my extension opens an incognito window for them to sign in?
let's say for instance when I click
<button id="open_Incognito">Start Session</button> it would open an incognito tab.

Redirect to login page on commandButton press if session is invalid

Brief: How can i redirect to the login page when commandButton is pressed and the user is not logged in anymore?
In detail:
I am trying to solve the following scenario in my primefaces application:
I successfully log in in my web application
I open a new tab while logged in.
Now i log out from the second tab that i opened on step 2. In this tab i get redirected to the login page
Press a commandButton from the 1st tab that still looks like if the
user logged in but not many things happen .
When trying to access a page through a link while logged out, then yes i am redirected to the login page. The same does not happen though with the commandButton component.
I am using a filter already and tried to catch that case, meaning to confirm if on button press the session is null to redirect me to login page.
As seen here: https://stackoverflow.com/a/1027592/1918516
The problem is that even though i logged out from the 2nd tab, and press a button from the 1st tab, my session is never null.
Update: After logging out and invalidate the session with invalidateSession() i see that my session is null. But when press on a button from the first tab, the session is NOT null. Could this be that the browsers cache is somehow maintaining an invalid session ?
Also i want to note here that i am retrieving the session with request.getSession(false)

Chrome extension: show browser action popup only in some cases

I have a chrome extension. When the user clicks the icon I want to:
Check if the user is logged in. This uses google storage (I've got this code already).
If user is logged in, there should NOT be a popup.
If user is not logged in, show browser action pop-up with login post/ajax form.
Google says "If a browser action has a popup, the popup appears when the user clicks the icon." https://developer.chrome.com/extensions/browserAction.html
So I guess not? I could instead add a form to the page DOM, but I'd rather not do that. Any other nice solutions?
Use chrome.browserAction.setPopup({ popup: ''}) to remove the popup.
From the browserAction.setPopup docs:
Sets the html document to be opened as a popup when the user clicks on the browser action's icon...
popup ( string ): If set to the empty string (''), no popup is shown.
You can use chrome.browserAction.setPopup to specify a popup page to show, or no popup at all. However, you must specify the popup before the user clicks the browser action; I don't believe you can change it "just in time" as the user clicks. You should simply start with the popup active by default, and then turn it off once the user has successfully logged in.

Have you ever seen as i have checked session behaviour in gmail.com ? Please help?

Yesterday morning i open gmail account in Internet Exlorer second tab. I checked my mail and closed that tab (not browser).
Then at the time of evining i again open second tab of browser and enetr gmail.com, it automatically redirect me at my email account without asking login.
I shocked and i thought i should remain browser open for whole night and today open gmail in second tab , it behave similar means without login screen it redirect in my gmail account.
Then i closed that tab and open another browser session and enter gmail i again surprised that i redirect me login page. At the same time i open second tab of first browser and it automatically redirect me at mail account page.
What i councluded by this behaviour is that might be gmail server keep my browser id at their server so that whenever i eneter gmail.com on second tab of first browser, it automatically redirect me at gmail account. I don't know i am right or not?
Please clear me this concept? What happens with my session at gmail server when i closed my browser tab?
As per my opinion it should automatically logout me but why this doesn't happened?
You probably ticked the option "stay signed in" the last time you logged in. Go back to gmail, click log out, and log in again, making sure that option is not ticked. Close the tab, come back in an hour, and open gmail again. You should be at the login screen this time.

Resources