Comments (6)
This isn't implemented in the library at present as we don't have a convenient place to monitor events from the opened custom tab. The situation is also more complex when using an intent for the system browser, as there is no such event to capture. I had planned to return to this and devise a solution to handle this (as it exists in the iOS variant of the library) but haven't had time yet. I'd be happy to discuss solutions and accept contributions to solve this problem.
from appauth-android.
I did look at the code, and noticed the "startActivity" call in AuthorizationService. I'm wondering if we instead call startActivityForResult, if both the chrome custom tab and the system browser would send a result back. It's unclear to me, however, what that result would look like in terms of hitting the close button as opposed to the window closing on a redirect. I suppose that would really be browser dependent.
from appauth-android.
Unfortunately I don't believe custom tabs return results in this way, and the defined callbacks don't appear to indicate when a tab is dismissed. I think the only option is to store some information in the invoking activity such that when a onStart / onResume occurs, we could determine whether an authorization flow was in progress. Returning to the original activity would likely mean the tab was closed, and we could take some remedial action at that point. I'm not sure if that kind of behavior belongs in the library or not; I'll need to experiment.
from appauth-android.
I figured that might be the case. We're working with our oauth team to implement a custom prompt=reauth flow so that we can use a webview and pass a login_id_hint or something to it, and not have to shared the cookies with the chrome browser itself. This can be closed if you feel it's not realistically implementable.
from appauth-android.
I'll leave it open until I mull over the problem some more; I'll also talk to the Chrome team as providing some kind of callback for closing the tab seems legitimately useful.
from appauth-android.
This is now fixed by #109 - we can fire a different intent for the user canceling the authorization flow.
from appauth-android.
Related Issues (20)
- Cancel the Authorization Request process
- Getting Activity Not Found Exception When trying to authorize the request
- 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
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.