Commit 542dcb3
feat(device-agent): implement device registration and authentication flow (#2281)
- Added DeviceAgentAuthService to handle device authentication, including generating and exchanging authorization codes.
- Implemented device registration logic with and without serial numbers, ensuring proper organization validation.
- Created new DTOs for device registration, check-in, and authorization code exchange.
- Updated DeviceAgentController to include endpoints for generating auth codes, registering devices, and checking in.
- Introduced proxy functionality in the portal to forward device-agent requests to the NestJS API, enhancing security and session management.
- Enhanced error handling and validation across new features, ensuring robust API interactions.
Tests included for all new functionalities to ensure reliability and maintainability.
Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>1 parent 8b74e54 commit 542dcb3
File tree
31 files changed
+1489
-716
lines changed- .github/workflows
- apps
- api/src
- auth
- device-agent
- dto
- portal/src/app
- (public)/auth/device-callback
- api/device-agent
- auth-code
- check-in
- exchange-code
- my-organizations
- register
- status
- updates/[filename]
- packages
- device-agent
- src
- main
- docs
31 files changed
+1489
-716
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| 120 | + | |
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
| |||
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
| 179 | + | |
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
| |||
319 | 326 | | |
320 | 327 | | |
321 | 328 | | |
| 329 | + | |
322 | 330 | | |
323 | 331 | | |
324 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | | - | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| 306 | + | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| |||
0 commit comments