Auth0 Home Blog Docs

"Provide a Login Control" Issues

auth0js
spa
login
react
#1

Hello,

I am following this auth0 tutorial here. 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).

#3

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!

#4

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!

#5

Yes I will today. You are awesome!

1 Like
#6

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

#7

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!

#9

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.

#10

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

#11

Hello Nate,

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

closed #12

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