# Getting current location using Auth0 rules

**URL:** <https://community.auth0.com/t/getting-current-location-using-auth0-rules/83826>\
**Category:** Get Help\
**Tags:** rules, auth0\
**Created:** [May 20, 2022, 4:48pm UTC](https://community.auth0.com/t/getting-current-location-using-auth0-rules/83826 "2022-05-20T16:48:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aloysius](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/aloysius/32/37178_2.png) [@aloysius](https://community.auth0.com/u/aloysius)\
**Post date:** [May 20, 2022, 4:48pm UTC](https://community.auth0.com/t/getting-current-location-using-auth0-rules/83826/1 "2022-05-20T16:48:53Z")

</div>

Hi,

Is there any way to get the current location of an user when signing up.

I found [Auth0 GetIp Rule](https://auth0.com/rules/get-getIP) to get the location. But it is not giving the exact location. I need something like [Navigator function](https://www.w3schools.com/html/html5_geolocation.asp) which gives an exact location.

Thank you.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 21, 2022, 1:09am UTC](https://community.auth0.com/t/getting-current-location-using-auth0-rules/83826/4 "2022-05-21T01:09:42Z")

</div>

Hey there @aloysius!

> [@aloysius](#):
>
> I found [Auth0 GetIp Rule](https://auth0.com/rules/get-getIP) to get the location. But it is not giving the exact location. I need something like [Navigator function](https://www.w3schools.com/html/html5_geolocation.asp) which gives an exact location.

I recommend looking into using a [Post Registration Action](https://auth0.com/docs/customize/actions/flows-and-triggers/post-user-registration-flow) - In it you can use [Event Object’s](https://auth0.com/docs/customize/actions/flows-and-triggers/post-user-registration-flow/event-object) `event.request` and in particular the `geoip` object. I _think_ that should get you what you are looking for 😄

Hope this helps!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [June 5, 2022, 1:09am UTC](https://community.auth0.com/t/getting-current-location-using-auth0-rules/83826/5 "2022-06-05T01:09:59Z")

</div>

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