Getting the sub key value from auth0.getuser()

Hi,

I have a fairly simple function and I would like to just get the sub key value from the auth0.getUser() function.

However when I call the following command:

console.log(auth0.getUser()['sub']);

I get an undefined message in the console. Any Ideas on how I can just get the sub key value?

Thanks

Hey there Oliver!

Can you tell me a little bit more about the part of stack of Auth0 you use so I can potentially help you? Thank you!