# "Provide a Login Control" Issues

**URL:** <https://community.auth0.com/t/provide-a-login-control-issues/22546>\
**Category:** Get Help\
**Tags:** spa, react, auth0js, login\
**Created:** [March 13, 2019, 3:25am UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546 "2019-03-13T03:25:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nsena/32/11748_2.png) [@nsena](https://community.auth0.com/u/nsena)\
**Post date:** [March 13, 2019, 3:25am UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/1 "2019-03-13T03:25:17Z")

</div>

Hello,

I am following this auth0 tutorial [here](https://auth0.com/docs/quickstart/spa/react#provide-a-login-control). Under the “Provide a Login Control” subtitle I have had no issue and pasted the desired text, but there is no demonstration of how to link Auth’s isAuthenticated() function within the App , so I get the error “Cannot read property isAuthenticated of undefined”.

What is the correct way to do this, considering the has an auth prop(also not shown).

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [March 13, 2019, 5:13pm UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/3 "2019-03-13T17:13:18Z")

</div>

Hey there @nsena, do you mind direct messaging me your Auth.js file so I can take a peek as your `isAuthenticated()` method should referenced there at the bottom. You can also snag a HAR file of the current authentication flow and send it over as well so we can take a deeper look. Thanks in advance!

> **[Generate and Analyze HAR Files](https://auth0.com/docs/troubleshoot/troubleshooting-tools/generate-and-analyze-har-files)**
>
> Learn how to troubleshoot with HAR files and steps to generate a HAR file.

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [March 15, 2019, 1:33pm UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/4 "2019-03-15T13:33:29Z")

</div>

Good morning, I just sent you a direct message with updated steps per our last conversation. When you get a chance can you give it a peak? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![nsena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nsena/32/11748_2.png) [@nsena](https://community.auth0.com/u/nsena)\
**Post date:** [March 16, 2019, 9:04pm UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/5 "2019-03-16T21:04:15Z")

</div>

Yes I will today. You are awesome!

---

<div class="post-metadata">

**Author:** ![nsena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nsena/32/11748_2.png) [@nsena](https://community.auth0.com/u/nsena)\
**Post date:** [March 18, 2019, 5:07pm UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/6 "2019-03-18T17:07:54Z")

</div>

Hey James,

I can’t for the life of me find any direct messages with your reply and code fixes. I have checked my inbox, but don’t seem to see it.

Nate

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [March 18, 2019, 7:11pm UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/7 "2019-03-18T19:11:22Z")

</div>

Hi there @nsena, I resent the message I initially sent over in a direct message. Essentially we need an HAR file capture while I investigate he code you sent over. Thanks!

> **[Generate and Analyze HAR Files](https://auth0.com/docs/troubleshoot/troubleshooting-tools/generate-and-analyze-har-files)**
>
> Learn how to troubleshoot with HAR files and steps to generate a HAR file.

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [March 21, 2019, 10:02pm UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/9 "2019-03-21T22:02:00Z")

</div>

Following up @nsenal, because we can only give limited support outside of Auth0 realm, I can not give a direct code resolution. However if you can better help me understand where this "Cannot read property isAuthenticated of undefined” is coming from, I may be able to give you assistance if it falls onto us. When referencing your HAR file, I did not see the error in the authentication flow which leads us to believe that this may be an actual application error within your code.

---

<div class="post-metadata">

**Author:** ![nsena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nsena/32/11748_2.png) [@nsena](https://community.auth0.com/u/nsena)\
**Post date:** [March 27, 2019, 9:14pm UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/10 "2019-03-27T21:14:25Z")

</div>

Hi James,

I have a high degree of confidence it is also an application error. From the tutorial I followed, there were no visible discrepancies in the code I wrote, considering the tutorial does not let you see completed code sections.  
Is there any way to get the code that this particular tutorial is building?

Nate

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [March 27, 2019, 9:35pm UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/11 "2019-03-27T21:35:00Z")

</div>

Hello Nate,

The code for the quickstarts is available in github, if that is what you are looking for:

[https://github.com/auth0-samples/auth0-react-samples/tree/master/01-Login](https://github.com/auth0-samples/auth0-react-samples/tree/master/01-Login)

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [April 11, 2019, 1:35am UTC](https://community.auth0.com/t/provide-a-login-control-issues/22546/12 "2019-04-11T01:35:01Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
