---
# System prepended metadata

title: OpenID Connect service

---

# OpenID Connect service

## List of events that auth-service consumes

### Register event

Description: This event is published from register service when user registers account
> exchange name: auth-ex

>exchange type: fanout

> queue name: auth-svc-register-event-handler

```Message```

```JSON
    {
        "user": {
            "_id": "userId",
            "email": "someone@gmail.com",
            "avatar": "http://avatar.com",
            "username": "John smith",
            "password": "passwordHash",
        },
        "event": {
            "_id": "event id"
        }
    }
```

### User update profile event

Description: This event is published from user service when user makes change profile
> exchange name: profile-ex

>exchange type: fanout

> queue name: auth-svc-user-profile-event-handler

```Message```

```JSON
    {
        "user": {
            "_id": "userId",
            "avatar": "http://avatar.com",
            "username": "John smith"
        },
        "event": {
            "_id": "event id"
        }
    }
```

### User change password event

Description: This event is published from user service when user changes password
> exchange name: profile-auth-ex

>exchange type: direct

> queue name: auth-user-svc-register-event-handler

```Message```

```JSON
    {
        "user": {
            "_id": "userId",
            "password": "passwordHash"
        },
        "event": {
            "_id": "event id"
        }
    }
```