---
# System prepended metadata

title: Register Service

---

# Register Service

## List of events that register-service publish

### Register by google or microsoft

Description: This event is published from register service when user register by google or microsoft
> exchange name: auth-ex
exchange type: fanout

> queue name:
> * auth-svc-register-event-handler
> * profile-svc-register-event-handler
> * course-svc-register-event-handler
> * exercise-view-svc-register-event-handler

```Message```

```JSON
{
   "user":{
      "_id":"41341c98-b5c1-4665-b4de-7c4cec4c25c5",
      "full_name":"HUỲNH ĐÌNH TIẾN",
      "email":"1712810@student.hcmus.edu.vn",
      "provider":"microsoft",
      "microsoft_id":"3fd745be-4a0a-43d1-80cc-bb2b7aefba42",
      "is_verified":true,
      "role":"STUDENT",
      "student_code":"1712810",
      "created_at": 1615642375625,
      "resetPasswordExpires":1614857719860,
      "resetPasswordToken":"74e639ac182d4780d0364ebdc1dc8c11bde0045c",
      "password":"$2a$10$uCZTSa7Xd8epkR0.FROFKOUXeVN5sWVnZyZJYDXLhlYytNeQsj8GC",
      "username":"HUỲNH ĐÌNH TIẾN"
   },
   "event":{
      "_id":"af6fc10b-210e-47fd-85f9-1c147d630b6c"
   }
}
```

### Update password

Description: This event is published from register service when user update password successfully
> exchange name: profile-auth-ex
exchange type: direct

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

```Message```

```JSON
{
   "user":{
      "_id":"41341c98-b5c1-4665-b4de-7c4cec4c25c5",
      "full_name":"HUỲNH ĐÌNH TIẾN",
      "email":"1712810@student.hcmus.edu.vn",
      "provider":"microsoft",
      "microsoft_id":"3fd745be-4a0a-43d1-80cc-bb2b7aefba42",
      "is_verified":true,
      "role":"STUDENT",
      "student_code":"1712810",
      "created_at": 1615642375625,
      "resetPasswordExpires":1614857719860,
      "resetPasswordToken":"74e639ac182d4780d0364ebdc1dc8c11bde0045c",
      "password":"$2a$10$uCZTSa7Xd8epkR0.FROFKOUXeVN5sWVnZyZJYDXLhlYytNeQsj8GC",
      "username":"HUỲNH ĐÌNH TIẾN"
   },
   "event":{
      "_id":"af6fc10b-210e-47fd-85f9-1c147d630b6c"
   }
}
```