Auth0 Home Blog Docs

Running Rule on /userinfo


I know rules get ran on login, but I’d love to be able to run a rule when something hits /userinfo.
In my case I’m storing some info that I don’t want available via the client browser, but would love to add it when accessing that same user info from my server.
I figured I could watch the context variable for the location/ip address and take it from there.

Though it seems like rules are only ran on login? Or is there a place to change that?



Hey there @justinftw!

Yep that is correct. Rules are only run at successful login (verification).

Hope it helps!


Interesting. That wasn’t completely obvious from the docs.

Wish there was a way to do this, as it would be extremely useful for in my case. :cry:


Gotchya! We already reported feedback about the message this doc conveys, so there should be a fix to that soon.

Can you provide more info and context around what you’re trying to build so I can possibly share that feedback with our product teams?


Sounds great.

In my case I was going try and use user meta_data to store some 3rd party api keys for the user. Though my thought was similar to how passwords are stored, to exclude the private key from any user info sent to the client. And allow access on my server to both public/private key in order to make some requests on behalf of the user.
I realize I may have been jimmy rigging the meta-data to be something that it wasn’t. Though I think the bigger thing is that ‘rules’ seamed confusing in that they looked like it was for all requests, not just login requests. I’d sugest changing the wording to ‘login rules’ or something like that.

Hope this helps!


Thanks a lot for sharing! I’ll make sure to relay it to one of our product teams!

closed #7

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