I am testing Ionic (Angular) with Capacitor. What I need to achieve is to authenticate to a specific CAS server.
When the user clicks on the "login" button.
...
private backendapi_login ='http://192.168.1.63:3000/api/user/login';
...
async onLogin() {
console.log('onLogin');
console.log(this.platform);
console.log(this.platformIsNative);
await Browser.open({ toolbarColor:'#f4dc41', url: this.backendapi_login });
}
The route /api/user/login (which is nodeJs + Express)
router.get('/api/user/login', authObject.bounce, AccountsController.login);
So the apps open the Capacitor Browser and the API redirects (bounce) to the authentication server.
The issue is that it looks like the authentication server fails as it considers that the session is expired... So it requests me to authenticate again.
It should validate the credentials and bounce back to the provided return URL finally the capacitor browser should close "itself".
The question is why the session does not pertain in the webview browser???
Any ideas? Thank you.