Symfony - how to get user details after login?

I’ve followed the tutorial at GitHub - auth0/symfony: Symfony SDK for Auth0 Authentication and Management APIs. and I can successfully authenticate with Auth0… on one page.

When I try $this->getUser() on any other page, I don’t receive the user’s details.

At the moment, as per the tutorial, the route /private is in the firewall. When I access it, i get the Auth0 login prompt. After a successful login, I see the user’s name, nickname, etc. Once the user is logged in, how do I get their details on pages which aren’t in the firewall?

I’m not sure if this is me not understanding Symfony’s firewall or Auth0’s model - but I would be grateful for some pointers.

Hey there!

Can I actually ask you to start it as a GitHub issue so we can discuss it directly with the repo maintainers? Once you have it created please share it here so we can ping them.

Thanks - I’ve added it at How to get user details after login? · Issue #153 · auth0/symfony · GitHub

1 Like

Perfect! I’ll ping the repo maintainers in a few minutes!

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