Logout event missing user information

I have Log Stream with Custom webhooks, It pushes the data to my URL. It sends all the right data for successful login but during logout it is missing user_id and user_name. How do I get user_id and user_name on logout??

Allowed Logout URLs
xyz://callback

Logout Url:
https://myDomain.auth0.com/v2/logout?client_id={clientId}&returnTo=xyz://callback

jObjects received from Auth0 on logout:

{
        "date": "2021-07-27T15:17:51.48Z",
        "type": "slo",
        "connection_id": "",
        "ip": "742.73.943.36",
        "user_agent": "Other 0.0.0 / Other 0.0.0",
        "details": {
            "return_to": "xyz://callback",
            "allowed_logout_url": [
                "xyz://callback"
            ]
        },
        "hostname": "myDomain.auth0.com",
        "user_id": "",
        "user_name": "",
        "log_id": "90020210727151755331772042853374757011368890737096654914",
        "_id": "90020210727151755331772042853374757011368890737096654914",
        "isMobile": false
    }

^^Missing user_id and user_name. Can anyone suggest how to get user information in logout’s webhook

Hi!

When the slo log type is missing the user_id this means that Auth0 did not find an active session that matches the session that was sent in the auth0 cookie.

These log entries indicate the user that made the request to /logout was already logged out or their existing session in Auth0 had already timed out / expired.

You can verify this by opening 2 tabs and logging into your application in both tabs.
Sign out of one tab, and then sign out in the other.

First log out when my session was active

{
  "date": "2021-07-27T18:22:44.653Z",
  "type": "slo",
  "connection": "Username-Password-Authentication",
  .......
  "hostname": "tenant.us.auth0.com",
  "user_id": "auth0|60.....",
  "user_name": "my.name@mydomain.com",
  ...
 }

Second logout when my session was not found

{
  "date": "2021-07-27T18:23:21.783Z",
  "type": "slo",
  "connection": "Username-Password-Authentication",
  .......
  "hostname": "tenant.us.auth0.com",
  "user_id": "",
  "user_name": "",
  ...
 }

Hope this helps!

2 Likes

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