Auth0 Home Blog Docs

Single Page App get userInfo as an empty object

#1

I have just downloaded the quick-start example of Auth0 SPA React and run it on local.
However, no matter what I changed the scope into, I always got an empty object API when I call user_info endpoint.
Can you please confirm that.
Best regards

#3

Hey there @qmau94!

Can you share with us the code snippet you use? Are you able to successfully hit any other endpoint?

#4

Hey there!

Have you had a chance to see my last message?

Empty profile in both idToken and userInfo endpoint
#5

@konrad.sopala
thanks for replying me
I used the example code for Single App Page (using React)


after login using auth0 login page and handle call back, I got this information

I used the access token code to hit auth0 user info endpoint but we got an empty object.
19_am_LI
I have changed the scope of the authentication request from “openid” to “openid profile email” but nothing changed.

best regards

#6

Gotchya!

Let me investigate this and get back to you with what I find!

#7

@konrad.sopala
Thanks a lot!

#8

Hey there!

Have you tried using this tutorial on retrieving user profile using our react SDK?

It will guide you step by step how to do it

#9

@konrad.sopala


I used the example and got nothing from user info, can you check that again.

Thanks alot!

#10

Ok thank you! Let me try to go through the tutorial myself and will let you know if it worked on my end!

1 Like
#11

@konrad.sopala
many thanks :slight_smile:

#12

Hey there @qmau94!

Sorry it took me so long to reproduce. I managed to successfully get the user profile following the steps in the tutorial I provided above.

Are you sure you’re following the tutorial precisely?

#13

Hey there!

Friendly ping from here :slight_smile: Have you had some time to take a look at my previous message? Have you moved somewhere forward with your development?

#14

@konrad.sopala
Thank you so much for helping me out.
I have created a new tenant and a new application, the sample have just worked fine.
I think that I have messed some settings up on the old one.
We can close this ticket now.
Thanks for your supports :+1:

#15

No worries! Glad that you have it working now!

closed #16

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