Empty user data problem with Auth0 SDK PHP and Universal Login

I would like to ask for your help regarding the use of the Auth0 PHP SDK in my project. Currently, I am implementing the “Universal Login” feature by connecting to a Custom Database Connections. From the logs, it seems that I am able to successfully connect and perform a “Success Exchange”. Moreover, for each of these logs, the e-mail address used for the connection is clearly visible.

On the other hand, when I perform an “exchange” in PHP, it works but the method getUser() : the user data are systematically empty. However, when I test the Universal Login from the Auth0 dashboard, I receive a complete JSON with the user’s information. I can’t figure out why the result differs in my PHP implementation.

Specifically, it’s the “/userinfo” API call that returns me a 200 code, but with an empty array.

Would you have any suggestions or recommendations to help me solve this situation? I thank you in advance for your advice and your kindness

Hey there!

It’s a better place for this type of question to ask it in a form of a GitHub issue in the PHP SDK repo here and discuss it directly with the repo maintainers:

Once you have a link to the issue you can share it here so we can ping them. Thank you!


Thanks for you answer.

I spent some time looking at the code and noticed that everything works fine! However, in order for the user to be returned correctly, it is important to provide a scope for Auth0. If the scope is not provided, the return will be an empty array for the user. Even if this seems normal, it would be useful to have logs to indicate that everything is working correctly. That way, if a user encounters a problem with a missing scope, they will know immediately where to look to solve the problem.

1 Like

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