Hi @konrad.sopala . we go further.
Now we’ve got a problem on the Auth0 callback.
From Android side, seems do not accept the App ID.
The error is:
Login:1 Failed to launch ‘io.rexulta.ionic.angular://re2n-dev.eu.auth0.com/capacitor/io.rexulta.ionic.angular/tabs/dashboard?code=dJZXix10LhWSNY0u&state=ZEJvWWYtWWd3emU1eWU2TC5zNHZjTWdmdXFaT284aXEuOXRpd0RKR3B0Mg%3D%3D’ because the scheme does not have a registered handler .
Hi, we think we found the reason of the problem.
When you try to login the system redirect to browser (the capacitor browser). In Android, capacitor has a bug: browser cannot be closed.
We are trying to find a workaround but it’s very hard
ionic 5, capacitor3, latest android sdk and studio (Aug 17th 2021)
we get a very similar error but the current behaviour is a little different
on login the browser opens after entering valid credentials
@konrad.sopala Do you have any recommendation for customers like us to deal with the current situation?
With google already forbid logging via an in-app browser, SSO naturally must be performed via a system browser. It’s fine and safe. However, the problem we are facing is that after authentication, the authorise page will continue to hang there. Both android and electron app have the same issue.
As mentioned by other users on this forum, some other providers would automatically close the browser tab after opening the callback (probably achieved by a js to open an URL on another tab and then close itself instead of the server based 302 response). Could auth0 achieve the same to provide a better user experience or is there another solution?
Hey @alvis ! sorry for the delay in the answer.
But I think the problem is not to close the browser, that is solved when after the login the callback says something like “my.app.starter://url_to_my_app”. It is like you write in your browser “mailto://” and the browser knows that has to open the email app.
This is called the “custom URL scheme”, and you have to configure that! For IoS you can find this info really valuable: Apple Developer Documentation
And for Android: Create Deep Links to App Content | Android Developers
And all of this info is part of the Ionic Capacitor (Angular) docs: " This article assumes you will be using Custom URL Schemes to handle the callback within your application. To do this, YOUR_PACKAGE_ID must be registered as a URL scheme for your chosen platform. See Defining a Custom URL Scheme for iOS, or Create Deep Links to App Content for Android." (https://auth0.com/docs/quickstart/native/ionic-angular/01-login)
Please, let us know if that could solve your problem.