I am building a chrome-extension for one of my react-native applications. It uses auth0 for authentication, works perfectly on web, but not in chrome extension.
I am using MemoryRouter for managing routes for chrome extension.
Since auth0 is a third-party platform it needs to be handled in different way?
I have not seen a replacement for that repo. Could you tell us more about the problems you are running into? Also, how are you using react native with a chrome extension?
This will open the auth0 popup in web and redirect urls are handled properly.
But the above thing won’t work for chrome-extension as it doesn’t deal with urls. I need to do something similar as shown in above code if application is running as chrome extension.
The problems I faced after using auth0-chrome plugin
Login popup opens in a separate window and upon successful login, app loads in the same popup not in chrome-extension.
Login popup opens after 3-4 clicks and is inconsistent always.
Throws the following error when popup fails to open
Uncaught (in promise) TypeError: Cannot read property ‘create’ of undefined
So main issue which I am unable to understand is how do I pass the control back to the extension upon successful login?
I am new to this stuff and I tried my best to explain what’s happening. Please let me know if you need any specific details.
Got it. I wouldn’t necessarily recommend using the auth0-chrome repro, since it is deprecated and has been for some time. You may be leaving your app open to some security issues there.
I can’t say I have enough familiarity with chrome extensions to provide a solution either. I will leave this topic open and maybe we can get some more eyes on it.
I know expo has caused some problems before, it may be worth checking this thread out if you haven’t already: