I have a problem when you test the StackExchange
Stack Exchange Authentication API to WebAuthenticationBroker
. If
If you proceed with authentication
authentication, such as screenshots it will continue to appear only in progress.
.
Prior it was able to get the authentication Token, now is not possible. And attach the Source Code as I've used, this is almost the same contents as Sample code MSDN.
public async void CallAuthenticationForOauth(Uri StartUri, Uri EndUri)
{
// reference : "https://msdn.microsoft.com/en-us/windows/uwp/security/web-authentication-broker"
//StartURi is implicit OAuth 2.0 flow (ex: https://stackexchange.com/oauth/dialog?client_id=*myid*&redirect_uri=https%3A%2F%2Fstackexchange.com%2Foauth%2Flogin_succes&scope=read_inbox%2Cno_expiry%2Cwrite_access%2Cprivate_info)
//EndURI is redirect URL ("https://stackexchange.com/oauth/login_succes")
try
{
WebAuthenticationResult WebAuthenticationResult = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.None, StartUri, EndUri);
if (WebAuthenticationResult.ResponseStatus == WebAuthenticationStatus.Success)
{
OutputToken(WebAuthenticationResult.ResponseData.ToString());
await GetStackExchangeAccessTokenAsync(WebAuthenticationResult.ResponseData.ToString());
}
else if (WebAuthenticationResult.ResponseStatus == WebAuthenticationStatus.ErrorHttp)
{
OutputToken("HTTP Error returned by AuthenticateAsync() : " + WebAuthenticationResult.ResponseErrorDetail.ToString());
}
else
{
OutputToken("Error returned by AuthenticateAsync() : " + WebAuthenticationResult.ResponseStatus.ToString());
}
}
catch (Exception error)
{
}
}
WebAuthenticationResult
should be returned. Keep that I remain.