Open EduarPer opened 2 months ago
There is something definitely missing with this logout support.
You can get around the id_token issue by adding it manually to the config object, but then you will hit another issue where it doesn't parse the logoutUrl.
It has been reported here https://github.com/capacitor-community/generic-oauth2/pull/233#issuecomment-1542479281 over a year ago. So I wonder if this lib is even maintained anymore?
Btw. for web and Android, this is the only logout approach that worked for me https://github.com/capacitor-community/generic-oauth2/issues/97#issuecomment-2178188975. Haven't tested iOS yet
Capacitor version:
Run
npx cap doctor
:@capacitor/android: 6.1.2 @capacitor/cli: 6.1.0 @capacitor/core: 6.1.0
Library version:
OAuth Provider:
Your Plugin Configuration
Affected Platform(s):
Android
AndroidManifest.xml
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
Current Behavior
When execute logout method on angular the parameter id_token is not available on Java class "GenericOAuth2Plugin" on Android Studio and the always enter on the if statement
String idToken = ConfigUtils.getParam(String.class, call.getData(), PARAM_ID_TOKEN); if (idToken == null) { this.disposeAuthService(); this.discardAuthState(); call.resolve(); return; }