Comments (5)
We may be able to add support for this special URI, but we currently recommend either using a custom scheme reflecting your package name or an HTTPS app link. I'm on vacation right now, I'll comment further when I get back next week.
from appauth-android.
Unfortunately urn:ietf:wg:oauth:2.0:oob
implies the use of WebView, as it's a redirect URI that embeds the authorization code in a HTML page which the app can then inspect. Apps being able to inspect and interact with the content of the page is one reason why AppAuth doesn't support WebView (and one reason why Google recently deprecated the use of OAuth in WebView).
Until this Authorization Server supports custom URI schemes, as a workaround you can potentially redirect to a page on your website, which can then 302 Redirect to your custom scheme. Iain has a demo of this workaround.
from appauth-android.
I don't see how the URI urn:ietf:wg:oauth:2.0:oob
implies the use of WebView. I'm familiar with the Google post that you mention, but I don't see how that applies here.
Developers just have to declare the scheme in their app manifest, just as you describe in your ReadMe:
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="urn"/>
</intent-filter>
No WebView required.
I successfully ran a small POC in my fork with the sample provided in this repo.
Am I missing something?
from appauth-android.
So is this Authorization Server passing the authorization code as a param on the oob
URI? That's a little different how Google treats the same (deprecated) oob
redirect where the authorization code is part of the HTML page (and requires extraction). So perhaps in this case oob
doesn't require WebView but it was certainly was still designed for WebView.
oob
isn't well suited to browser-based OAuth, there's a better and more standard way to do this which is custom URI schemes & claimed-HTTPS redirects. One issue I see with your implementation is that you've claimed urn
globally which means that your app will be competing with all apps that use this redirect choice to get the return intent (as a side point, can you at least claim only urn:ietf:wg:oauth:2.0:oob
so you're not getting non-OAuth related intents as well?). It may work OK in Chrome Custom Tab which preferences the app that launched it for the redirect intent, but if the request was launched in a different browser, then all apps claiming this scheme would compete for the authorization response's redirect intent which would confuse the user (at best).
Since supporting the older WebView OAuth patterns is a non-goal for AppAuth, I don't see us supporting this redirect option in the main repo.
from appauth-android.
Yes, the authorization code is passed as a param on oob
.
Thanks for the feedback on the POC. I'd definitely use a specific path along with the urn scheme in production code.
Not supporting old patterns sounds reasonable. I appreciate the explanation and will look for alternatives.
from appauth-android.
Related Issues (20)
- Authorization canceled error. HOT 3
- Fatal Exception: java.lang.SecurityException: Binder invocation to an incorrect interface HOT 2
- What is authorization end point an token end point in the case of FHIR services From Epic HOT 5
- Do not open browser HOT 5
- User cancelled flow HOT 2
- Using this lib for oAuth flow HOT 2
- Can this library be used on Android TV? HOT 3
- Oauth2.0
- [Spam] HOT 6
- Avoid Fatal Exception: net.openid.appauth.d: grant request is invalid in Firebase Crashlytics HOT 3
- Como la instalo con termux HOT 1
- Why Isn't AppAuth not using kotlin yet? HOT 2
- android.content.ActivityNotFoundException: When app opened HOT 5
- Incorrect documentation I think
- TokenResponse JSON parsing null values as "null" strings
- Zdd
- D
- Lisene
- Communication problems between AuthorizationManagementActivity and RedirectUriReceiverActivity are caused by an Android 14 task stack issue.
- PKCE is enabled so don't have client_secret- value but this library gives Null pointer exception in this case. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appauth-android.