Auth0 GeoIP Resolution Returns Undefined Country Code for Specific IP Addresses
Last Updated:
Overview
A Post-Login Action that manages access based on the Auth0 GeoIP information may return an undefined country code for certain IP addresses. This occurs due to a data-coverage gap in the MaxMind GeoIP database, which is the GeoIP provider of Auth0. Resolve this issue by adding an exception for the trusted IP address in the action and submitting a data correction request to MaxMind. Specifically, the event.request.geoip.countryCode property returns undefined for the IPv6 address, which causes the Action to deny access incorrectly.
Applies To
- Auth0
- Post-Login Actions
- GeoIP Resolution
Cause
Auth0 sources GeoIP information directly from the MaxMind GeoIP database. When a request reaches the public ingress of an Auth0 space, Auth0 supplies GeoIP information using the latest copy of this database. The undefined country code results from a data coverage gap in the MaxMind database for a specific IP address.
Solution
How is the undefined country code issue resolved?
These incidents fall outside of Auth0's control, as Auth0 does not own the affected IP addresses or operate the GeoIP-specific services. MaxMind must handle these IP gaps. Submit a data correction request on the MaxMind page to resolve the issue.
Until MaxMind handles these missing information events, implement a workaround inside the Post-Login Action. Include a special condition that allows access from the affected IP addresses, assuming the administrator fully trusts the addresses.