2

I'm using the WebAuthenticationBroker to allow users to log in to their account:

var accessToken = "";
var uri = "https://stackexchange.com/oauth/dialog?redirect_uri=https://localhost.com&client_id=" + RareSettings.ApplicationId + "&scope=read_inbox,no_expiry,write_access,private_info";

var startUri = new Uri(uri);
var endUri = new Uri("https://localhost.com");

var webAuthenticationResult = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, startUri, endUri);

if (webAuthenticationResult.ResponseStatus == WebAuthenticationStatus.Success)
{
    var response = webAuthenticationResult.ResponseData.ToString();
    string[] keyValPairs = response.Split('#');
    for (int i = 0; i < keyValPairs.Length; i++)
    {
        string[] splits = keyValPairs[i].Split('=');
        switch (splits[0])
        {
            case "access_token":
                accessToken = splits[1];
                break;
        }
    }
}

This was working fine for months. But suddenly whenever I enter credentials on the login dialog, it doesn't even request approval from the user. It just redirects to Stack Exchange. I've made sure all my parameters are correct (even though none of them have changed since they were first working) and have even created a completely new application. I've tried it on 4 different devices; same issue. Is something broken on Stack Exchange's end?

EDIT: I have now tried this link in 3 different browsers on 2 different machines:

https://stackexchange.com/oauth/dialog?redirect_uri=https://stackexchange.com/oauth/login_success&client_id=MYID&scope=read_inbox,no_expiry,write_access,private_info

with the same results. What is up with this? Is it at least being worked on?

0

1 Answer 1

2

Sorry about that. Turns out, return URLs were broken on stackexchange.com entirely during signup and login. A fix is out now, so any API app auth redirect issues should also be resolved with it.

Please let me know if you see any other problems. Thanks for the report, and my apologies for the delay in fixing the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .