Skip to main content

Hello!

I have UWP 8.1 app, I integrated box v2.

everything work fine with developer token.

But when I add OAuth2, somethung went wrong.

When I try get access to app (get authCode) openin a new windows woth login. After I click on "locgin" it show me a error :BOX_199fb3ntwel5dd6xn3qlsgxq1r4dw518.png

My redirect Uri is "https://localhost/"

 

How I call acces page:

 

 WebAuthenticationResult war = await WebAuthenticationBroker.AuthenticateAsync(
WebAuthenticationOptions.None,
authCodeUri,
callbackUri);

 


What do you have monitoring http://localhost/?



I have never monitor localhost. And dont know what I sholud to see.

I used MS Massage Analyze:

BOX_bk56i3b3uh3508mo4wzgrlljodrpy5sg.png

52 min - open page with login

54 min - click "authorize"

What I have to do? 



When your user is prompted to log into Box and authorizes (or denies) access for the application, the access token is posted to the redirect URL you provide (http://localhost/, for example).  So you grab the access token from that and use it for your subsequent application requests.



I dont understand, how?

I take this code from W8 sample, and in tutorial that code is working fine.

WebAuthenticationResult - just does not reciev enything, And how I said the error throw  before page with access and deny.

But my app with Dev token works fine....



Was this problem ever resolved.  We run into a similar problem but not on all PC's.  Some PC's fail to load the redirect URL, others do this correctly.



Reply