I need to force my users to Sign out from all their Google accounts. I have a link which can do that:
https://www.google.com/accounts/Logout
And also I found a way in javascript how can I trigger this link:
new Image().src = "https://www.google.com/accounts/Logout";
Everything works except incognito mode and Firefox webbrowser.
The result in Web browser console is exactly the same in both situations and also it triggers that endpoint cause I can see entries in Networking which response with status 200, but I am still sign in with accounts.
Do you have any idea what might be wrong? There is no error in console. I do only receive CORS blocked but I don't care about response. I just need to make sure users are logged out before they do next actions in my website.
Do you have any other ideas how can I achieve that?
Thanks in advance
Related
I have a strict requirement to only allow a logged in user to open my web app in one tab. I've noticed that WhatsApp and Google Messenger's web apps have implemented this. For example, trying to open those apps in more than one tab (be it on the same browser, different browser, or even different device) results in these warnings:
Anyone know how this is done? There must be some sort of sync happening between the server and the client to ensure that only one tab is open. But this would require a unique tab identifier, which can get quite complicated to build reliably. Anyone know how WhatsApp and Google Messenger are doing it? Their technique seems to work flawlessly.
I don't know exactly how this is done at WhatsApp and Google Messenger, but if you work with WebSockets (your post hast the tag "websocket", so I assume, you do) every tab has its single connection to the server, and if your users need to be logged in you could check if the user has already a open weboscket connection to your server.
I have a Firebase app and have started playing around with the quickstart examples. I have created apps in Facebook, Google and Twitter and filled in the necessary clientId/secret information.
When testing the example pages facebook-credentials.html and google-credentials.html, everything works fine.
I am using Firebase 3.6.4 JS also.
When trying out the facebook-popup.html and facebook-redirect.html, and in fact the popup/redirect examples for Google and Twitter, I always get the following error in the Javascript console:
firebase.js:191 Uncaught Error: Network Error
at firebase.js:191
(anonymous) # firebase.js:191
This seems to happen fairly quickly, but the HTTP request is still pending. After maybe 30 seconds, I then get another message in the console:
GET https://XXXXXXX.firebaseapp.com/__/auth/iframe?apiKey=YYYYYYY&appName=%5BDEFAULT%5D&v=3.6.4&usegapi=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en_GB.1grkUO4uZ2s.O%2Fm%3D__features__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCMXwBvX3_duAb3Vw22ujByEbXKdJA net::ERR_TIMED_OUT
(note I have masked out my application name as XXXXXXX and API key as YYYYYYY).
Does anyone know why this is happening?
I really want to get Twitter working, but there is no twitter-credentials method, so I'll need to get the popup or redirect working.
It appears that this was a lower level issue on my PC. I haven't gotten to the bottom of it yet but the Twitter examples work on another PC. At this point I am thinking it might be my antivirus or Firewall, so I am closing this topic.
I think you're also being blocked. My application quit working, and another one that was using firebase also quit working, so we called IT. There was new security software blocking the network request. Similar errors, blank popup, that's how I ended up here.
I'm trying to use the new HTML notification API...
I'm still stuck in the request authorization phase;
when user click on a button it's executed the function:
// this is all inside a click handler
var fn = console.info;
window.Notification.requestPermission(function(grant) {
fn(grant);
});
When i tryed this for the first time in chrome, a chrome's message came out asking me if i want to concede the Notification grant to my localhost web site... I said no (just to test even this case). Then I tried again, but that message from chrome never came out.
My question:
If the user change opinion about notification, how could enable notification for a website?
Maybe do I've to change something in the chrome settings?
Thanks in advance
You can manage and re-allow notifications in Chrome by going to Settings -> Privacy -> Content Settings -> Scroll down to Notifications - here you can manage which sites are allowed to show notifications and which are not.
Update:
As mentioned by #ivan_vaz in the comments, it is also possible to configure this as well as other permissions by clicking the favicon of the website in the address/navigation bar.
I am using valums ajax-upload together with a ashx handler to let users upload files in the webapp Im developing. All is working absolutely fine for about 95% (around 3000) of the users.
For the last about 5% I get reports that the upload never finish, the wheel just keeps spinning people say. It seems that those who get this error are all are using IE9.0.
I have tested on all the IE9.0 I can come across but still have not been able to reproduce the error. I also have tried to log all thinkable errors but still no luck.
Please, can anyone reproduce the problem and hopefully give me a JavaScript console error transcript if any. To test go to step 2 (Upload section) and try to upload a small text file:
https://jobmatchprofile.com/backend/login.aspx?auto_login=24G3FY
UPDATE
I have been in contact with a user who experienced this problem. The error message can be seen here. It is in danish and says: "SCRIPT5 Access denied".
Error message
What is strange is that the user had same IE version as is working for others (me for example): I have been testing on: 9.0.8112.16421 and also ran WIN7 (as I). The Product-id differs however and he had a danish version where I have the US version.
UPDATE II
I was finally able to reproduce this error. I know this sounds a little strange, but belive me it is true: when opening the page via a link sent to my gmail account I get the same error. The user from first Update also used gmail to open the page.
Your reference to Gmail, specifically, points in the direction of a solution: Gmail strips the referrer data from the HTTP headers when you click on a link within an e-mail, except when you use your right mouse button and select "Open in New Tab [or Window]", presumably because this prevents their code from intercepting the headers. Is your script checking for a valid HTTP REFERRER, by any chance?
Are you making any cross-(sub)domain or cross-protocol AJAX calls? If so, then you may have to proxy the request(s). Consider the following solutions from the Yahoo! Developer Network:
http://developer.yahoo.com/javascript/howto-proxy.html
See also:
SCRIPT5: Access is denied in IE9 on xmlhttprequest
Access denied to jQuery script on IE
"Access is denied" JavaScript error when trying to access the document object of a programmatically-created <iframe> (IE-only)
(Un)fortunately, I wasn't able to reproduce the error in IE9, v. 9.0.8112.16421 (although I did get a general on-site error when trying to upload an empty .txt file, but this seems wholly unrelated).
The solution for ie9 is simply to upload using https:
https://www.parse.com/questions/internet-explorer-and-the-javascript-sdk
Even though you are sure that it's related to the user clicking the anchor within the email I would say it's because of policy settings within Internet Explorer. I have seen errors like these before and noticed that the most common errors were related to Internet Explorer policies of users within a corporate environment.
when using simple example like at
https://developers.facebook.com/docs/reference/dialogs/oauth/
after auth box prompting for additional permissions appears, it jumps around the screen, and there is this message in the java console
Unsafe JavaScript attempt to access frame with URL https://s-static.ak.fbcdn.net/connect... etc.
The unsafe message can be ignored. It just happens before the cross domain loader code has initialized.
Never seen the chrome issue. Could you provide version numbers of browser and OS please?