I’m trying to build login for my Ionic 4 application. I have tried with both auth0 WebAuth and auth0 Lock, which work fine locally in the browser but fail when deployed on a device. On the device, google responds with “disallowed_useragent”. I’m aware of what this error means but why is it that auth0 has not implemented a way around? Does auth0 lock not support mobile login?
I also tried using auth0/cordova but it’s badly documented so could not get it to work but I noticed it has the known issue of not working locally. It says on the github that it must be deployed to a real device for testing and that I need to fork my cod, etc. This approach is unsatisfactory.
Does Auth0 provide any technology for native login but that also works locally? As it stands I’ve tried 3 approaches and nothing works. Do I need to move to Ionic Auth Connect to achieve this?
Very disappointing that after almost a year after Ionic 4 release there is still no working solution. Please confirm whether auth0-lock is supposed to work on a real mobile device or not?
I hear your frustration and apologize that there is not an implementation to satisfy your needs. It is important to us to listen to customer demand and provide developer-centric solutions. I highly recommend submitting some constructive feedback to our product team if you would like to communicate with them directly.
I can confirm lock works on mobile. Let me know if you have any more questions, I would be more than happy to work through them with you.
If auth0-lock works on mobile then I don’t really have a problem. The problem is that auth0-lock does not work on mobile for me. Are you saying that it works only when loaded in a browser or are you saying it working on mobile as a native app?
As I mentioned in my original post, when using lock running on the mobile device as an Ionic application and try to use Google login I get the following:
I see, it wasn’t clear in your original post that you are tying to implement an embedded flow. It makes sense now why you are getting the errors, you are trying to use a web based sdk, meant for browsers.
It certainly works with browser based flow, that is what we recommend for a number of reasons, even on mobile.