# Access\_Denied for embedding auth login on react-based SPA

**URL:** <https://community.auth0.com/t/access-denied-for-embedding-auth-login-on-react-based-spa/7766>\
**Category:** Get Help\
**Tags:** auth-login-react-spa\
**Created:** [August 6, 2017, 4:15am UTC](https://community.auth0.com/t/access-denied-for-embedding-auth-login-on-react-based-spa/7766 "2017-08-06T04:15:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hurjun1995](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@hurjun1995](https://community.auth0.com/u/hurjun1995)\
**Post date:** [August 6, 2017, 4:15am UTC](https://community.auth0.com/t/access-denied-for-embedding-auth-login-on-react-based-spa/7766/1 "2017-08-06T04:15:10Z")

</div>

Hi, I’m follwoing the Quick Start for react-based SPA to embed auth0 login. Currently the login page(Auth lock?) provided by auth0 comes up when I click the login button that I made, but when I click on facebook login, I get the follwoing:

Object {error: “access\_denied”, errorDescription: “Cannot read property ‘split’ of undefined”, state: “0K\_~VzBJJ5SwQSu5naemhFD-5L~SVYEl”}

When I click google login, I get:  
Object {error: “access\_denied”, errorDescription: “Cannot read property ‘split’ of undefined”, state: “0K\_~VzBJJ5SwQSu5naemhFD-5L~SVYEl”}

Can anyone help me on this problem?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [August 7, 2017, 4:02pm UTC](https://community.auth0.com/t/access-denied-for-embedding-auth-login-on-react-based-spa/7766/2 "2017-08-07T16:02:57Z")

</div>

The **most common cause for an `access_denied` error** which has an associated description **that sounds like a Javascript error** is the **use of a rule that is throwing an error**.

In this case it seem that you have a rule that is calling the `split` method on a variable or property that is `undefined`. **Ensure that your rules make the the correct assumptions for all the scenarios you need to support or implement guards again possibly missing data**.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/access-denied-for-embedding-auth-login-on-react-based-spa/7766/3 "2018-03-02T05:55:47Z")

</div>


