Auth0 Home Blog Docs

Rules geoip state, province information?

rules

#1

We love the fact that you can access the context object within Auth0 Rules! We are currently looking at segmenting our users based on their locations. The context object gives us a lot of great information about where the user is located. We get their country code, city name, lat+long cords. etc.

Has anyone built a custom solution that hits an external API or service to grab the user’s province or state code? Does Auth0 have a best practice for this? Google offers a location api but it’s rates are a bit expensive. Looking to see if someone has solved this cheaply.


#2

Hey there @lucas1! I don’t know of a custom solution that has been built that hits an external API or service to grab the user’s province or state code. Were you able to come up with a solution that fills that void? Also if this is something you would like to see in the future from Auth0 you can always do a feature request at Auth0.com/feedback.