-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes Android when default browser is not support CustomTabs #111
Conversation
Thank you very much for your PR! From a first quick look, it seems to be fine. |
1. Chrome 2. Custom Browser Order 3. default Browser 4. Installed Browser
…cess Google after installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply - I was on honeymoon.
I have a few changes/comments :)
flutter_web_auth_2/android/src/main/kotlin/com/linusu/flutter_web_auth_2/CallbackActivity.kt
Outdated
Show resolved
Hide resolved
* must register in AndroidManifest.xml : | ||
* <intent-filter> | ||
* <action android:name="android.intent.action.SEND" /> | ||
* <category android:name="android.intent.category.DEFAULT" /> | ||
* <data android:mimeType="text/plain" /> | ||
*</intent-filter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add proper documentation in the README maybe? For example, in the Setup/Android section?
If it is not mandatory to do this, please properly point that out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes it may open a browser that cannot auto redirect back to app, and need to add this to receive sharing from the browser.
<intent-filter> | ||
<action android:name="android.intent.action.SEND" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<data android:mimeType="text/plain" /> | ||
</intent-filter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this is needed if autoVerify="true"
. But is it really needed in the example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the scheme is not http/https, so don't need add autoVerify="true"
.
Thank you very much for your contribution! I will fix the remaining issues upstream |
fix: if the default browser is not support customtabs , after sign in , it cannot redirect to app.