Skip to main content

Hello


 


I found two library used to implement OAuth2.0 in my android application.


API1) https://github.com/box/box-android-sdk


API2) https://github.com/koush/box-android-sdk-v2


 


The operation of each library according to Redirect URI is different. 


 


In API1, the android app created before Nov 29, 2021 is ok when I don't configure redirect URI, but the other created after Nov 29, 2021 is NOT ok. So if I success to authenticate OAuth2.0 in the later case, I had to set a redirect URI in developer console to "https://app.box.com/static//sync_redirect.html". I think it's maybe caused that the static variable BoxConfig.RECIRECT_URL is set default to "https://app.box.com/static/sync_redirect.html".


 


In API2, regardless to app creation date, I success to athenticate that even if I do not configure redirect URI or use any URI. For example, when I set redirect URI to "https://www.google.com" and do not set redirect URL in android app, it works well.


 


Q1. I want to use 'API1'. Then, after May 13, 2022, should I set redirect URI to "https://app.box.com/static//sync_redirect.html"?


Q2. Is it ok to use 'API2'?


 


Thank you.

Hello, 


Based on the links you sent... V2 isn't a library Box maintains.... it looks like that is a fork from another developer... 


I will also add we updated the redirect url policy, which is discuss here and here


Thanks, 


Alex, Box Developer Advocate


In Android Content API, BoxConfig.REDIRECT_URL is set to "https://app.box.com/static/sync_redirect.html" by default and 'Redirect URI' in developer console is set to "https://app.box.com/" too. So it occurs "redirect_uri_mismatch" errors though all settings remaining to defaults. This has not been a problem, because only checking the domain and not the path before.


 


It's solved by setting redirect URI to "https://app.box.com/static/sync_redirect.html" in console, but I don't know this solution is right. Could you help me this problem?


Reply