Skip to main content
edited title
Link
rene
  • 2.8k
  • 2
  • 17
  • 35

The Authentication Problem of WebAuthenticationBroke ClassrWebAuthenticationBroker Class in .NET 4.6

deleted 1 character in body; edited tags
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

I have a problem when you test the StackExchangeStack Exchange Authentication API to WebAuthenticationBroker. If
If you proceed with authenticationauthentication, such as screenshots it will continue to appear only in progress.

enter image description here enter image description here

.

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.

I have a problem when you test the StackExchange Authentication API to WebAuthenticationBroker. If you proceed with authentication, such as screenshots it will continue to appear only in progress.

enter image description here enter image description here

.

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.

I have a problem when you test the Stack Exchange Authentication API to WebAuthenticationBroker.
If you proceed with authentication, such as screenshots it will continue to appear only in progress.

enter image description here enter image description here

.

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.

Post Reopened by Brock Adams, Tim Stone
added 1934 characters in body; edited title
Source Link

The Authentication Problem of WebAuthenticationBrokerWebAuthenticationBroke Classr in UWP App.NET 4.6

My UWP(Universal Windows Store Application) App's Stack Exchange APII have a problem when you test the StackExchange Authentication is used by "API to WebAuthenticationBroker Class's. If you proceed with AuthenticateAsyncauthentication method", such as screenshots it will continue to appear only in progress.

Itenter image description here enter image description here

.

Prior it was working fineable to get the authentication Token, now it doesis not work at all. It seems that being in a Loop without finding RedirectURLpossible. So looking for a way to solveAnd attach the Source Code as I've used, this problemis 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.

The Authentication Problem of WebAuthenticationBroker in UWP App

My UWP(Universal Windows Store Application) App's Stack Exchange API Authentication is used by "WebAuthenticationBroker Class's AuthenticateAsync method".

It was working fine, now it does not work at all. It seems that being in a Loop without finding RedirectURL. So looking for a way to solve this problem.

The Authentication Problem of WebAuthenticationBroke Classr in .NET 4.6

I have a problem when you test the StackExchange Authentication API to WebAuthenticationBroker. If you proceed with authentication, such as screenshots it will continue to appear only in progress.

enter image description here enter image description here

.

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.

Post Closed as "Needs details or clarity" by Brock Adams, Tim Stone
added 4 characters in body; edited tags
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Loading
Source Link
Loading