In our app we are trying to use the browser to login a user and grab an access token from the url. We are trying to use the listener “browserPageLoaded” to check the current url and strip the token. With the Cordova plugin In app browser we have used the “loadStart” event which is called EVERY time the browser loads a page in which we then can check if the token is there and strip the token. Does the current Capacitor Browser API handle this type of functionality? Are we using the right listener? If there is not this current functionality, is it in the plans to make it a part of the Browser API?
I have noticed this problem too! We would love to switch to use capacitor, but this is stopping us from switching.
I am having the same issue in an enterprise app we are developing with Capacitor. Having this fixed or having some workaround would allow us to move forward.
Same problem here. Trying to move through auth and grab a token using the provided listener "browserPageLoaded". Doesn't seem to listen on every load like one would think. Loving what capacitor is doing so far but this is keeping me from jumping all in...
This feature would be very helpful. I hope this is added soon to capacitor to help our team migrate to this great tool.
Please, November 2019 and we need this feature!!
Same issue here, I can't complete my login flow because I can't know when the login has completed and the redirect uri is loaded.
still same issue, January 2020
This is a limitation on the native components used in Browser plugin, so it's not possible to implement it.
If you want to use Browser plugin to do oauth, you need to use a custom app schemes or app links/deep links. Those will trigger appUrlOpen on App plugin and you can get the token there.
Too bad the issue was closed.,
I've have a different problem(not oauth) with same issue.
My app has payment gateway which has only web support. Payment gateway redirects me to success url or failure url which I need to listen in my app and close the web view.
Have had high hopes for capacitor, too bad we cannot move away completely from cordova.
Most helpful comment
Please, November 2019 and we need this feature!!