Skip to content

Commit a73bfba

Browse files
committed
Update README properly
1 parent 69f13c7 commit a73bfba

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

flutter_web_auth_2/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ final accessToken = jsonDecode(response.body)['access_token'] as String;
8989
The following constraints have been added in `5.0.0`:
9090
- The existing Android approach has been replaced with a new (improved) one (no migration necessary; is automatically used)
9191
- Android now uses Auth Tab: `httpsHost` and `httpsPath` are now required on Android if you are using a `https` in `callbackUrlScheme`
92+
- On Android, issues with `taskAffinity`s have been fixed and it is strongly advised to set `android:taskAffinity=""` for all exported `Activity`s (this usually includes your `MainActivity` and `flutter_web_auth_2`'s `CallbackActivity`)
9293
- Dart SDK `>=3.5.0` is now required (due to migration to melos `7.x`)
9394

9495
### Upgrading to `4.x`
@@ -163,7 +164,8 @@ In order to capture the callback url, the following `activity` needs to be added
163164
164165
<activity
165166
android:name="com.linusu.flutter_web_auth_2.CallbackActivity"
166-
android:exported="true">
167+
android:exported="true"
168+
android:taskAffinity="">
167169
<intent-filter android:label="flutter_web_auth_2">
168170
<action android:name="android.intent.action.VIEW" />
169171
<category android:name="android.intent.category.DEFAULT" />
@@ -279,7 +281,8 @@ When you use this package for the first time, you may experience some problems.
279281
<!-- add the com.linusu.flutter_web_auth_2.CallbackActivity activity -->
280282
<activity
281283
android:name="com.linusu.flutter_web_auth_2.CallbackActivity"
282-
android:exported="true">
284+
android:exported="true"
285+
android:taskAffinity="">
283286
<intent-filter android:label="flutter_web_auth_2">
284287
<action android:name="android.intent.action.VIEW" />
285288
<category android:name="android.intent.category.DEFAULT" />
@@ -299,7 +302,8 @@ When you use this package for the first time, you may experience some problems.
299302
<application>
300303
<activity
301304
android:name="com.linusu.flutter_web_auth_2.CallbackActivity"
302-
android:exported="true">
305+
android:exported="true"
306+
android:taskAffinity="">
303307
<intent-filter android:label="flutter_web_auth_2">
304308
<action android:name="android.intent.action.VIEW" />
305309
<category android:name="android.intent.category.DEFAULT" />
@@ -318,12 +322,13 @@ When you use this package for the first time, you may experience some problems.
318322
- <activity android:name="com.linusu.flutter_web_auth_2.CallbackActivity">
319323
+ <activity
320324
+ android:name="com.linusu.flutter_web_auth_2.CallbackActivity"
321-
+ android:exported="true">
325+
+ android:exported="true"
326+
+ android:taskAffinity="">
322327
```
323328
324329
- If you want to have a callback URL with `http` or `https` scheme, you also need to specify a host etc.
325330
See [c:geo](https://github.com/cgeo/cgeo/blob/d7ab67629ac4798adaae194e563afe7df134fcd0/main/AndroidManifest.xml#L164) as an example for this.
326-
- There is also a known problem with task affinities and launch modes (see [#113](https://github.com/ThexXTURBOXx/flutter_web_auth_2/issues/113)). In order to ensure that `flutter_web_auth_2` works correctly, set `android:launchMode="singleTop"` and remove any `android:taskAffinity` entries. This configuration is guaranteed to work.
331+
- In older versions of this package, there was a known problem with task affinities and launch modes (see [#113](https://github.com/ThexXTURBOXx/flutter_web_auth_2/issues/113)). In order to ensure that `flutter_web_auth_2` works correctly on these versions (prior to `5.0.0-alpha.2`), set `android:launchMode="singleTop"` and remove any `android:taskAffinity` entries. This configuration is guaranteed to work. In newer versions, this should not cause problems!
327332
328333
### Troubleshooting OAuth redirects
329334

0 commit comments

Comments
 (0)