# Auth0 in react-native application not working for chrome extension

**URL:** <https://community.auth0.com/t/auth0-in-react-native-application-not-working-for-chrome-extension/37672>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [February 10, 2020, 8:27am UTC](https://community.auth0.com/t/auth0-in-react-native-application-not-working-for-chrome-extension/37672 "2020-02-10T08:27:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kishor-tricon](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kishor-tricon/32/19054_2.png) [@kishor-tricon](https://community.auth0.com/u/kishor-tricon)\
**Post date:** [February 10, 2020, 8:27am UTC](https://community.auth0.com/t/auth0-in-react-native-application-not-working-for-chrome-extension/37672/1 "2020-02-10T08:27:41Z")

</div>

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 found this [https://github.com/auth0-community/auth0-chrome](https://github.com/auth0-community/auth0-chrome) but this repo is depricated so I am not sure on proceeding with this.

Any suggestions will be helpful and let me know if I am missing something.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 18, 2020, 5:57pm UTC](https://community.auth0.com/t/auth0-in-react-native-application-not-working-for-chrome-extension/37672/3 "2020-02-18T17:57:04Z")

</div>

Hi @kishor-tricon,

Welcome to the Auth0 Community Forum!

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?

Thanks,  
Dan

---

<div class="post-metadata">

**Author:** ![kishor-tricon](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kishor-tricon/32/19054_2.png) [@kishor-tricon](https://community.auth0.com/u/kishor-tricon)\
**Post date:** [February 18, 2020, 7:39pm UTC](https://community.auth0.com/t/auth0-in-react-native-application-not-working-for-chrome-extension/37672/4 "2020-02-18T19:39:35Z")

</div>

Thanks @dan.woda!

I am using expo tools for building the react-native application and using the bundled version I could build a chrome extension.

For the web version I have followed the Auth0 steps and added necessary callback urls in Auth0 account.

```
this.auth0.authorize({
      state: window.location.href,
      code_challenge: challenge,
      code_challenge_method: 'S256'
});

```

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

1. Login popup opens in a separate window and upon successful login, app loads in the same popup not in chrome-extension.
2. 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

1. 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.

Thanks,  
Kishor

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 19, 2020, 5:44pm UTC](https://community.auth0.com/t/auth0-in-react-native-application-not-working-for-chrome-extension/37672/5 "2020-02-19T17:44:14Z")

</div>

@kishor-tricon,

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:

> [@Implementing Auth0 in React Native / Expo App](http://community.auth0.com/t/implementing-auth0-in-react-native-expo-app/17406):
>
> Has anyone implemented Auth0 in a React Native / Expo app? Can anyone point me to an article? Any advice or suggestions would be appreciated. Thank you! Sam

Sorry I don’t have a better answer for you!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 18, 2020, 7:49pm UTC](https://community.auth0.com/t/auth0-in-react-native-application-not-working-for-chrome-extension/37672/6 "2020-03-18T19:49:35Z")

</div>


