P
P
proto-type2017-02-23 22:34:40
JavaScript
proto-type, 2017-02-23 22:34:40

How to get user information in auth0.js?

Hey! I ran into a problem, I've already rummaged through the whole Google :-) please help me solve it.
How to get user information in auth0.js?
I get the information of the user under which I am currently logged in like this:

//...
 this.authHttp .get(`https://MY_DOMAIN/api/v2/users/USER_ID`)
 //...

But using the same method to get information about another user (under which he is not logged in) does not work.
those. user #1 needs to get information from user #2 (for example, his name, email or other values)
If you apply the code above to an unlogged user (by his user_id), then an alert will appear with the following value: "User to be acted on does not match subject in bearer token"
and console error: GET https://MY_DOMAIN/api/v2/users/USER_ID 403 (Forbidden).
Maybe someone has already encountered such a problem? I will be very grateful for the answer!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Mozharov, 2017-02-23
@werftgyhj

This means that 1 user has no rights to receive data about any other user of the system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question