-
Notifications
You must be signed in to change notification settings - Fork 462
dep(android): update net.openid:appauth from 0.8.1 to 0.11.1 #731
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
dep(android): update net.openid:appauth from 0.8.1 to 0.11.1 #731
Conversation
|
The androidx.browser dependency is also outdated (implementation 'androidx.browser:browser:1.2.0'), I think it's best to update this as well. |
kadikraman
left a comment
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.
Thank you for the PR!
|
Are there any plans to release this fix soon? Because we are experiencing this exact issue on production |
|
@timostroehlein We integrated patch-package in our project. This allows you to define patches (diffs) in your project which are applied post-install. It's great for addressing issues like these while you are awaiting on official release with the fix :) For instance: diff --git a/node_modules/react-native-app-auth/android/build.gradle b/node_modules/react-native-app-auth/android/build.gradle
index 85fb638..3eff1a2 100644
--- a/node_modules/react-native-app-auth/android/build.gradle
+++ b/node_modules/react-native-app-auth/android/build.gradle
@@ -56,6 +56,6 @@ repositories {
dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+' // From node_modules
- implementation 'net.openid:appauth:0.8.1'
- implementation 'androidx.browser:browser:1.2.0'
+ implementation 'net.openid:appauth:0.11.1'
+ implementation 'androidx.browser:browser:1.4.0'
}
diff --git a/node_modules/react-native-app-auth/android/src/main/java/com/rnappauth/RNAppAuthModule.java b/node_modules/react-native-app-auth/android/src/main/java/com/rnappauth/RNAppAuthModule.java
index 8736904..207c176 100644
--- a/node_modules/react-native-app-auth/android/src/main/java/com/rnappauth/RNAppAuthModule.java
+++ b/node_modules/react-native-app-auth/android/src/main/java/com/rnappauth/RNAppAuthModule.java
@@ -784,11 +784,9 @@ public class RNAppAuthModule extends ReactContextBaseJavaModule implements Activ
final Activity currentActivity = getCurrentActivity();
EndSessionRequest.Builder endSessionRequestBuilder =
- new EndSessionRequest.Builder(
- serviceConfiguration,
- idTokenHint,
- Uri.parse(postLogoutRedirectUri)
- );
+ new EndSessionRequest.Builder(serviceConfiguration)
+ .setIdTokenHint(idTokenHint)
+ .setPostLogoutRedirectUri(Uri.parse(postLogoutRedirectUri));
if (additionalParametersMap != null) {
if (additionalParametersMap.containsKey("state")) {
diff --git a/node_modules/react-native-app-auth/android/src/main/java/com/rnappauth/utils/EndSessionResponseFactory.java b/node_modules/react-native-app-auth/android/src/main/java/com/rnappauth/utils/EndSessionResponseFactory.java
index 4cad2da..1bc35c7 100644
--- a/node_modules/react-native-app-auth/android/src/main/java/com/rnappauth/utils/EndSessionResponseFactory.java
+++ b/node_modules/react-native-app-auth/android/src/main/java/com/rnappauth/utils/EndSessionResponseFactory.java
@@ -13,8 +13,10 @@ public final class EndSessionResponseFactory {
WritableMap map = Arguments.createMap();
map.putString("state", response.state);
- map.putString("idTokenHint", response.request.idToken);
- map.putString("postLogoutRedirectUri", response.request.redirectUri.toString());
+ map.putString("idTokenHint", response.request.idTokenHint);
+ if (response.request.postLogoutRedirectUri != null) {
+ map.putString("postLogoutRedirectUri", response.request.postLogoutRedirectUri.toString());
+ }
return map;
}
diff --git a/node_modules/react-native-app-auth/index.d.ts b/node_modules/react-native-app-auth/index.d.ts
index 7079aab..f7d4ad9 100644
--- a/node_modules/react-native-app-auth/index.d.ts
+++ b/node_modules/react-native-app-auth/index.d.ts
@@ -172,9 +172,11 @@ type AppAuthErrorCode =
| 'service_configuration_fetch_error'
| 'authentication_failed'
| 'token_refresh_failed'
+ | 'token_exchange_failed'
| 'registration_failed'
| 'browser_not_found'
- | 'end_session_failed';
+ | 'end_session_failed'
+ | 'authentication_error';
type ErrorCode =
| OAuthAuthorizationErrorCode |
|
That's great! Thanks for the Information, i will do that |
|
This is published in the next release candidate 7.0.0-rc1 🎉 |
Fixes when targeting Android SDK 31 (Android 12), it's not possible to login via browser, on Android 7, 8, 9, 10 or 11 when you have Opera or Opera Beta installed.
Authorising immediately fails with an error (code: no_browser_found, message: Error not specified).
Description
Bumps the net.openid:appauth library from 0.8.1 to 0.11.1 (https://github.com/openid/AppAuth-Android/tags).
Steps to verify
authorize