[GH-ISSUE #8277] bug: dashboard shows AWS EC2 IPs instead of omitting unknown client IPs #28366

Closed
opened 2026-04-17 19:47:55 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @danpasecinic on GitHub (Mar 2, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/8277

Originally assigned to: @Bekacru on GitHub.

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Have multiple users sign in from different geographic locations around the same time
  2. Open the dashboard and check the event log
  3. Observe that early events for each user show 15.224.15.25 (Paris, France) as the location.

Current vs. Expected behavior

The dashboard displays what appears to be an internal infrastructure/proxy IP address (15.224.15.25, 35.181.170.78, resolving to Paris, France) when the real client IP is not yet available.

This is misleading because it shows the same IP and geolocation for completely unrelated users who are in different parts of the world.

Three different users (from Netherlands, France, and a third location) all show 15.224.15.25 / Paris, France as their IP on initial events (User Signed Out, Account Linked, User Signed In, User Created, User Sign In Failed). The correct client IP only appears on later events like Session Created.

Image

Expected behavior would be: when the actual client IP cannot be determined, the location field should either be left empty or display "Unknown" rather than substituting an infrastructure IP.

What version of Better Auth are you using?

1.5.1

System info

{
  "system": {
    "platform": "darwin",
    "arch": "arm64",
    "version": "Darwin Kernel Version 25.3.0: Wed Jan 28 20:47:03 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T6031",
    "release": "25.3.0",
    "cpuCount": 14,
    "cpuModel": "Apple M3 Max",
    "totalMemory": "36.00 GB",
    "freeMemory": "3.66 GB"
  },
  "node": {
    "version": "v22.21.0",
    "env": "local"
  },
  "packageManager": {
    "name": "npm",
    "version": "10.9.4"
  },
  "frameworks": [
    {
      "name": "hono",
      "version": "^4.12.3"
    }
  ],
  "databases": [
    {
      "name": "@prisma/client",
      "version": "^7.4.2"
    }
  ],
  "betterAuth": {
    "version": "^1.5.1",
    "config": {
      "appName": "[REDACTED]",
      "baseURL": "http://localhost:3006",
      "secret": "[REDACTED]",
      "trustedOrigins": "[REDACTED]",
      "emailAndPassword": {
        "enabled": true,
        "minPasswordLength": 8,
        "autoSignIn": true,
        "password": {}
      },
      "socialProviders": {
        "google": {
          "clientId": "[REDACTED]",
          "clientSecret": "[REDACTED]",
          "prompt": "select_account"
        },
        "apple": {
          "clientId": "[REDACTED]",
          "clientSecret": "[REDACTED]",
          "appBundleIdentifier": "[REDACTED]",
          "responseMode": "form_post"
        },
        "facebook": {
          "clientId": "[REDACTED]",
          "clientSecret": "[REDACTED]"
        }
      },
      "account": {
        "accountLinking": {
          "enabled": true,
          "trustedProviders": ["google", "apple", "facebook"]
        }
      },
      "session": {
        "expiresIn": 2592000,
        "updateAge": 86400
      },
      "rateLimit": {
        "enabled": true,
        "window": 60,
        "max": 100
      },
      "user": {
        "changeEmail": {
          "enabled": true
        }
      },
      "advanced": {
        "cookiePrefix": "better-auth",
        "useSecureCookies": false,
        "defaultCookieAttributes": {
          "sameSite": "lax"
        },
        "crossSubDomainCookies": {
          "enabled": true,
          "domain": "localhost"
        },
        "database": {
          "generateId": "uuid"
        }
      },
      "plugins": [
        {
          "name": "admin",
          "config": {
            "id": "admin",
            "hooks": {
              "after": [{}]
            },
            "endpoints": {},
            "$ERROR_CODES": {
              "FAILED_TO_CREATE_USER": {
                "code": "FAILED_TO_CREATE_USER",
                "message": "Failed to create user"
              },
              "USER_ALREADY_EXISTS": {
                "code": "USER_ALREADY_EXISTS",
                "message": "User already exists."
              },
              "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL": {
                "code": "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL",
                "message": "User already exists. Use another email."
              },
              "YOU_CANNOT_BAN_YOURSELF": {
                "code": "YOU_CANNOT_BAN_YOURSELF",
                "message": "You cannot ban yourself"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE",
                "message": "You are not allowed to change users role"
              },
              "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS",
                "message": "You are not allowed to create users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS",
                "message": "You are not allowed to list users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS",
                "message": "You are not allowed to list users sessions"
              },
              "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS",
                "message": "You are not allowed to ban users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS",
                "message": "You are not allowed to impersonate users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS",
                "message": "You are not allowed to revoke users sessions"
              },
              "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS",
                "message": "You are not allowed to delete users"
              },
              "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD",
                "message": "You are not allowed to set users password"
              },
              "BANNED_USER": {
                "code": "BANNED_USER",
                "message": "You have been banned from this application"
              },
              "YOU_ARE_NOT_ALLOWED_TO_GET_USER": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_GET_USER",
                "message": "You are not allowed to get user"
              },
              "NO_DATA_TO_UPDATE": {
                "code": "NO_DATA_TO_UPDATE",
                "message": "No data to update"
              },
              "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS",
                "message": "You are not allowed to update users"
              },
              "YOU_CANNOT_REMOVE_YOURSELF": {
                "code": "YOU_CANNOT_REMOVE_YOURSELF",
                "message": "You cannot remove yourself"
              },
              "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE": {
                "code": "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE",
                "message": "You are not allowed to set a non-existent role value"
              },
              "YOU_CANNOT_IMPERSONATE_ADMINS": {
                "code": "YOU_CANNOT_IMPERSONATE_ADMINS",
                "message": "You cannot impersonate admins"
              },
              "INVALID_ROLE_TYPE": {
                "code": "INVALID_ROLE_TYPE",
                "message": "Invalid role type"
              }
            },
            "schema": {
              "user": {
                "fields": {
                  "role": {
                    "type": "string",
                    "required": false,
                    "input": false
                  },
                  "banned": {
                    "type": "boolean",
                    "defaultValue": false,
                    "required": false,
                    "input": false
                  },
                  "banReason": {
                    "type": "string",
                    "required": false,
                    "input": false
                  },
                  "banExpires": {
                    "type": "date",
                    "required": false,
                    "input": false
                  }
                }
              },
              "session": {
                "fields": {
                  "impersonatedBy": {
                    "type": "string",
                    "required": false
                  }
                }
              }
            },
            "options": {
              "defaultRole": "user",
              "adminRoles": ["admin"],
              "impersonationSessionDuration": 3600
            }
          }
        }
      ]
    }
  }
}

Which area(s) are affected? (Select all that apply)

Other

Originally created by @danpasecinic on GitHub (Mar 2, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/8277 Originally assigned to: @Bekacru on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Have multiple users sign in from different geographic locations around the same time 2. Open the dashboard and check the event log 3. Observe that early events for each user show `15.224.15.25` (Paris, France) as the location. ### Current vs. Expected behavior The dashboard displays what appears to be an internal infrastructure/proxy IP address (`15.224.15.25`, `35.181.170.78`, resolving to Paris, France) when the real client IP is not yet available. This is misleading because it shows the same IP and geolocation for completely unrelated users who are in different parts of the world. Three different users (from Netherlands, France, and a third location) all show 15.224.15.25 / Paris, France as their IP on initial events (`User Signed Out`, `Account Linked`, `User Signed In`, `User Created`, `User Sign In Failed`). The correct client IP only appears on later events like `Session Created`. <img width="1328" height="490" alt="Image" src="https://github.com/user-attachments/assets/da0d6379-25a1-4d6a-b930-150dd6d56ac2" /> Expected behavior would be: when the actual client IP cannot be determined, the location field should either be left empty or display "Unknown" rather than substituting an infrastructure IP. ### What version of Better Auth are you using? 1.5.1 ### System info ```bash { "system": { "platform": "darwin", "arch": "arm64", "version": "Darwin Kernel Version 25.3.0: Wed Jan 28 20:47:03 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T6031", "release": "25.3.0", "cpuCount": 14, "cpuModel": "Apple M3 Max", "totalMemory": "36.00 GB", "freeMemory": "3.66 GB" }, "node": { "version": "v22.21.0", "env": "local" }, "packageManager": { "name": "npm", "version": "10.9.4" }, "frameworks": [ { "name": "hono", "version": "^4.12.3" } ], "databases": [ { "name": "@prisma/client", "version": "^7.4.2" } ], "betterAuth": { "version": "^1.5.1", "config": { "appName": "[REDACTED]", "baseURL": "http://localhost:3006", "secret": "[REDACTED]", "trustedOrigins": "[REDACTED]", "emailAndPassword": { "enabled": true, "minPasswordLength": 8, "autoSignIn": true, "password": {} }, "socialProviders": { "google": { "clientId": "[REDACTED]", "clientSecret": "[REDACTED]", "prompt": "select_account" }, "apple": { "clientId": "[REDACTED]", "clientSecret": "[REDACTED]", "appBundleIdentifier": "[REDACTED]", "responseMode": "form_post" }, "facebook": { "clientId": "[REDACTED]", "clientSecret": "[REDACTED]" } }, "account": { "accountLinking": { "enabled": true, "trustedProviders": ["google", "apple", "facebook"] } }, "session": { "expiresIn": 2592000, "updateAge": 86400 }, "rateLimit": { "enabled": true, "window": 60, "max": 100 }, "user": { "changeEmail": { "enabled": true } }, "advanced": { "cookiePrefix": "better-auth", "useSecureCookies": false, "defaultCookieAttributes": { "sameSite": "lax" }, "crossSubDomainCookies": { "enabled": true, "domain": "localhost" }, "database": { "generateId": "uuid" } }, "plugins": [ { "name": "admin", "config": { "id": "admin", "hooks": { "after": [{}] }, "endpoints": {}, "$ERROR_CODES": { "FAILED_TO_CREATE_USER": { "code": "FAILED_TO_CREATE_USER", "message": "Failed to create user" }, "USER_ALREADY_EXISTS": { "code": "USER_ALREADY_EXISTS", "message": "User already exists." }, "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL": { "code": "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL", "message": "User already exists. Use another email." }, "YOU_CANNOT_BAN_YOURSELF": { "code": "YOU_CANNOT_BAN_YOURSELF", "message": "You cannot ban yourself" }, "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE": { "code": "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE", "message": "You are not allowed to change users role" }, "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS", "message": "You are not allowed to create users" }, "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS", "message": "You are not allowed to list users" }, "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS": { "code": "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS", "message": "You are not allowed to list users sessions" }, "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS", "message": "You are not allowed to ban users" }, "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS", "message": "You are not allowed to impersonate users" }, "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS": { "code": "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS", "message": "You are not allowed to revoke users sessions" }, "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS", "message": "You are not allowed to delete users" }, "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD": { "code": "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD", "message": "You are not allowed to set users password" }, "BANNED_USER": { "code": "BANNED_USER", "message": "You have been banned from this application" }, "YOU_ARE_NOT_ALLOWED_TO_GET_USER": { "code": "YOU_ARE_NOT_ALLOWED_TO_GET_USER", "message": "You are not allowed to get user" }, "NO_DATA_TO_UPDATE": { "code": "NO_DATA_TO_UPDATE", "message": "No data to update" }, "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS": { "code": "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS", "message": "You are not allowed to update users" }, "YOU_CANNOT_REMOVE_YOURSELF": { "code": "YOU_CANNOT_REMOVE_YOURSELF", "message": "You cannot remove yourself" }, "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE": { "code": "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE", "message": "You are not allowed to set a non-existent role value" }, "YOU_CANNOT_IMPERSONATE_ADMINS": { "code": "YOU_CANNOT_IMPERSONATE_ADMINS", "message": "You cannot impersonate admins" }, "INVALID_ROLE_TYPE": { "code": "INVALID_ROLE_TYPE", "message": "Invalid role type" } }, "schema": { "user": { "fields": { "role": { "type": "string", "required": false, "input": false }, "banned": { "type": "boolean", "defaultValue": false, "required": false, "input": false }, "banReason": { "type": "string", "required": false, "input": false }, "banExpires": { "type": "date", "required": false, "input": false } } }, "session": { "fields": { "impersonatedBy": { "type": "string", "required": false } } } }, "options": { "defaultRole": "user", "adminRoles": ["admin"], "impersonationSessionDuration": 3600 } } } ] } } } ``` ### Which area(s) are affected? (Select all that apply) Other
GiteaMirror added the devtoolscorebug labels 2026-04-17 19:47:55 -05:00
Author
Owner

@Bekacru commented on GitHub (Apr 13, 2026):

This should be fixed sometime ago, let me know if this is still an issue

<!-- gh-comment-id:4233730141 --> @Bekacru commented on GitHub (Apr 13, 2026): This should be fixed sometime ago, let me know if this is still an issue
Author
Owner

@danpasecinic commented on GitHub (Apr 13, 2026):

@Bekacru , that's indeed still an issue. Can't check now specifically as we got a limit, but yeah.

<!-- gh-comment-id:4234258283 --> @danpasecinic commented on GitHub (Apr 13, 2026): @Bekacru , that's indeed still an issue. Can't check now specifically as we got a limit, but yeah.
Author
Owner

@Bekacru commented on GitHub (Apr 13, 2026):

Okay, thanks. I'll ping the team.

<!-- gh-comment-id:4234300408 --> @Bekacru commented on GitHub (Apr 13, 2026): Okay, thanks. I'll ping the team.
Author
Owner

@jonathansamines commented on GitHub (Apr 13, 2026):

Hey @danpasecinic, we just deployed a new fix for this. Please let us know if you still see server IP addresses being identified as the client IP.

<!-- gh-comment-id:4239712947 --> @jonathansamines commented on GitHub (Apr 13, 2026): Hey @danpasecinic, we just deployed a new fix for this. Please let us know if you still see server IP addresses being identified as the client IP.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#28366