To replicate:
Open two github tabs on which you're both logged in
Log out of one tab.
At the top of the 2nd tab you almost immediately get notification that you logged out on another tab
I've been trying to figure out how this works. Since the notification is almost immediate I considered 3 possibilities:
Each tab makes XHR/AJAX requests on a schedule to check session validity with the server (or uses long polling)
Each tab registers an event listener to Server Sent Events, and receives notification from the server upon logout.
Each tab has a websocket connection to the server, and receives a similar notification.
For reference, these technologies are discussed here. I am stumped though because when I open the web browser's (Firefox 48 beta) network requests dev tool, I see no communication on the tab that shows the notification between the time I log out of the other tab, and the time the notification appears.
By the way, the notification works in the opposite direction as well. If you have two tabs logged out, and you log into one of them, a notification immediately pops up on the other tab that you logged in. What's going on?
Github uses Local Storage for this trick. It uses entry with key 'logged-in'. This key is either true or false and is set each time user logs in/out. Each tab constantly check (as I know there is no event on Local Storage modification) Local Storage.
Related
Using this sample api named 'Auth.java',
https://github.com/youtube/api-samples/tree/master/java/src/main/java/com/google/api/services/samples/youtube/cmdline
last of those line :
'return new AuthorizationCodeInstalledApp(flow, localReceiver).authorize("user");'
when that .authorize("user") start to work, it opens google account select page on default brower .
if I choose my google account and following flows, it works very well.
but problem occured after opening browser. if I don't choose google account or just close this page, code stopped and stay that line. so close browser and if I take course of Oauth again, error
occurs : binding port already used(8080).
what I want is how can I take callback from server or anywhere like browser has closed so rollback this process or if authorizing process doesn't work for miinute, process roll back.
I've had a Slack app up and running for quite some time which has been working flawlessly. The app sends messages that have an interactive button on it. It also has slash command interactivity.
However, since this morning, whenever a user presses the button on the message, Slack displays an exclamation point (!) next to it with the message "Error in establishing a secure connection. Please use a secure certificate for the interactivity URL of this app."
The SSL cert on my server is not expired and I've made absolutely no changes to the Request URL within the app's settings. Does anyone know what the problem may be?
We have a live application that gives the "The API developer key is invalid" intermittently.
The normal flow:
User clicks "Import from Google Drive"
Gets an OAuth screen
Selects a user (if there are more than one)
Gets prompted with the Google Picker
Picks a file
File gets imported
But for some users, after selecting a user in point 3 (or automatically if there is only one user) the Picker dialog doesn't open, but gets prompted with an "In order to select an item from your online storage, please sign in" message on black background with red Sign in button on it. (see screenshot)
Sign in screen
Then after clicking "Sign in", the user receives the "The API developer key is invalid" error message, and the flow stops. (see screenshot again)
API key error screen
For the majority of the users everything works fine. Seems to be a per user issue, because we have an affected user that has multiple gmail addresses signed in into Chrome, and this issue happens with one email address, but doesn't happen with the other.
Any ideas?
After a long search, I found a workaround. I had to replace the gapi.auth2.init and gapi.auth2. signIn calls with gapi.auth2.authorize and it started to work for those affected users too. Submitted a report to Google about it, but at the time of writing, there was not much reply: https://github.com/google/google-api-javascript-client/issues/613
How can I get node-red to detect that the dashboard UI page has been visited, i.e. someone is looking at the page.
I say this be cause I would then send more frequent updates to the dashboard then when no one is visiting. i know i can implement a Websockets, but then this will be a page that i create not the dashboard UI
I have looked everywhere, and in forums, no solutions offered besides
create a custom webpage
The ui_control node can be used to emit messages when this happens.
From the info sidebar for the ui_control node:
When any browser client connects or loses connection, or changes tab, this node will emit a msg containing:
payload - connect, lost, or change.
socketid - the ID of the socket (this will change every time the browser reloads the page).
socketip - the ip address from where the connection originated.
tab - the number of the tab. (Only for 'change' event).
name - the name of the tab. (Only for 'change' event).
I'm setting up TeamCity 7.0.3 on a build machine. Everything is working OK apart from the Google Talk notifications using the Jabber notifier. When I send a test notification it works fine. But when the build completes/fails I don't get any notifications. The notifications do work locally on the machine using the system tray notifier. I have registered for all projects and all events but stil nothing is coming through. I am using the same gmail account to send the message as to receive it which could be a bit odd but the test messages work. This could be a firewall issue I guess but again the test message works.
Any ideas?
I use the following settings in TeamCity 7.1 to set up Jabber:
http://i48.tinypic.com/9ay0xz.png
Obviously, replace my_user#gmail.com with the Google Talk user that should send notifications. Note that, when using Google Talk, you can't send messages to yourself, so the Server User must be different than the Jabber accounts for any users that want to receive notifications.
Now, you need to configure the notification rules for your user. Click on your name in the upper right hand corner, then in "My Settings & Tools" click "Edit" beside the Jabber Notifier under "Watched Builds and Notifications". This page looks like this:
http://i47.tinypic.com/xpq3y9.png
Note that the "Jabber Account" must be different than the "Server User" above (or else you won't receive notifications; this is the first mistake I made when first setting this up). Also note that you must set up rules for each build or groups of builds that you want Jabber notifications for by clicking "Add new rule." Jabber Notifier will not inherit your Email Notifier rules (this is the other mistake I made when first setting this up).