Sourcetree cannot refresh OAuth token, I get error ERR_SSL_PROTOCOL_ERROR - atlassian-sourcetree

When using Atlassian's Sourcetree I try and and "Refresh OAuth Token" and I see this error:
This site can’t provide a secure connection
localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

The issue here is we were developing a website that sets the HSTS header such that all localhost requests now require HTTPS.
The work-around is to remove localhost from your domain security policies.
If Chrome is your browser, you can do that here: chrome://net-internals/#hsts
Under the heading Delete domain security policies enter localhost in the 'domain' input and press delete
Now try and "Refresh OAuth Token" again.

Using Chrome I had this issue, my workaround for this was:
Open an incognito Window
Paste in the localhost address and change HTTPS to HTTP
Refresh page and I'm authenticated
I'm on SourceTree version 3.3.8

Related

Cannot test Facebook OAuth in development because 'Valid OAuth Redirect URIs' not allowing localhost

In Facebook Login Settings (in Valid OAuth Redirect URIs), when I attempt to add http://localhost:8000/survey, I get the following message,...,
http://localhost redirects are automatically allowed while in development mode only and do not need to be added here.
So, when I attempt to use http://localhost:8000/survey in my redirect_uri= parameter on my https://www.facebook.com/v7.0/dialog/oauth?client_id=... URL for FB login, I get this error message on the FB login page:
URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.
Okay,... so I'm not allowed to whitelist http://localhost:8000/survey by adding it to Valid OAuth Redirect URIs -- where it says that http://localhost redirects are automatically allowed -- but then when I actually use a localhost URL, it is not whitelisted.
How is it possible test my app's FB login in a localhost/development environment? (I'm familiar with ngrok, but is there another way besides that?)
The first part you quoted mentions the app being set in Development Mode:
http://localhost redirects are automatically allowed while in development mode only and do not need to be added here.
You can toggle this from the top right corner of your App Dashboard on Facebook's site. More detailed instructions here: https://developers.facebook.com/docs/apps/managing-development-cycle/#step1
Another alternative that you have is using your hosts file to point a domain name to your localhost, if you can't set your app in development mode.

Testing "Facebook Login" locally

I am trying to locally test my "Continue With Facebook" button. I get this error telling me the URL is invalid. Below is how I have configured my app's OAuth settings. Based on all my research this is configured correctly but something is still wrong.
I am using npm http-server to run a local instance of my site. It is running on localhost:8080
As per the last image, it wont let me add domain such as "http://localhost:8080". It only lets me add "localhost"
If your actual production URL is domain.com then in FB > Settings > App Domains, add the additional URL local.domain.com. Then on your local machine in the /etc/hosts file (or Windows equivalent) add the entry:
127.0.0.1 local.domain.com
In a browser, navigate to local.domain.com and that URL will be served up by your local machine (i.e. localhost). This will keep Facebook Login happy while running a test / development version.
You'll also need to whitelist your machine's IP (in FB > Settings > Advanced > Security > Server IP Whitelist) and add an additional http://local.domain.com/callback (in FB > Facebook login > Settings > Valid OAuth redirect URIs).

Cannot connect to TFS with Eclipse (OSX)

I'm trying to connect to our TFS with the Eclipse Plugin using this tutorial: https://msdn.microsoft.com/en-us/library/jj155782(v=vs.120).aspx
Unfortunately I get different error messages (depending on what I do):
#1
URL: http://< my TFS-URL >/tfs
Result: "The soap endpoint /Servies/v1.0/Registration.asmx could not be contacted. HTTP status: 404"
#2
URL: http://< my TFS-URL >/tfs/DefaultCollection
Result: "Basic credentials are only supported over HTTPS secure connections"
#3
URL: https://< my TFS-URL >/tfs (doesn't matter if DefaultCollection is there or not)
Result after about 2 minutes of waiting - I can't login at all: "Unrecognized SSL message, plaintext connection?"
The URL and the credentials are 100% right, I can connect in the browser but it wont work with Eclipse.
We are using TFS2013 and my plugin version is 14.0.2.2015... if that is somewhat important.
The problem is staring you in the face:
URL: http:///tfs/DefaultCollection Result: "Basic credentials are only supported over HTTPS secure connections"
You need to either set up TEE to not care if you send credentials over plain-text (which is bad and I strongly recommend against, but can be accomplished by setting the com.microsoft.tfs.client.allowInsecureBasic environment variable), or set up HTTPS.
Enabling Basic authentication and setting up HTTPS is something your TFS administrator will have to do.
There are other options (like Kerberos authentication) if you have your Mac joined to a Windows domain, but HTTPS + Basic authentication is probably the easiest if you don't.

Facebook app on localhost on windows server 2012

I have a Facebook app which is defined in Facebook as localhost.
I have it installed on a windows server 2012 with a self signed certificate issues to that server name.
In the IE (and chrome), if I open https://localhost it doesn't go through the Facebook and fails on certificate, if I open https://servername it goes through the Facebook but again, doesn't open claiming it doesn't have a valid security certificate.
I created 2 certificates, one for localhost (issues by "localhost") and one for the servername, both don't work.
I tried everything I could find online and some advice from friends including changing security settings on IE.
Any ideas will be appreciated
Thank you

My FBML APP doesn't work accessing through HTTPS

Just installed a SSL certificate and when I try to access to my fmbl app through https connection I can't see the application, the page is blank and I'm losing lots of users and the rate of my app is going to the deep down.
However, if I access to the app through http (non ssl) I can see without problems.
Thanks!
Have you solved?
'Cause i think the problem is arise by Chrome.
If your application has a self-signed SSL cert and you open it on chrome you'll receive a 501 error message. Chrome should show an alert message whit a 'continue' button to enter the app, but this doesn't happen when chrome call an https resource from an iframe.
Is it a self-signed certificate? For some reason, FB doesn't support those, and you'll need a certificate which is signed by a CA.