@jetthai/cuora 1.1.471-dev.0 → 1.1.471-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/machine/auth.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.471-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.471-dev.0...v1.1.471-dev.1) (2026-09-24)
|
|
6
|
+
|
|
5
7
|
### [1.1.471-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.470-dev.2...v1.1.471-dev.0) (2026-09-23)
|
|
6
8
|
|
|
7
9
|
### [1.1.470](https://github.com/jetthai/cuora-module/compare/v1.1.469...v1.1.470) (2026-09-14)
|
package/package.json
CHANGED
package/src/machine/auth.js
CHANGED
|
@@ -180,6 +180,7 @@ export default function (request) {
|
|
|
180
180
|
initial: 'deviceTokenChecking',
|
|
181
181
|
states: {
|
|
182
182
|
deviceTokenChecking: {
|
|
183
|
+
entry: 'clearDeviceToken',
|
|
183
184
|
invoke: {
|
|
184
185
|
src: 'checkDeviceToken',
|
|
185
186
|
onDone: {
|
|
@@ -396,6 +397,8 @@ export default function (request) {
|
|
|
396
397
|
dt: event.data?.dt ?? null,
|
|
397
398
|
}
|
|
398
399
|
}),
|
|
400
|
+
// checkDeviceToken 失敗走 onError 不會執行 setDeviceToken,先清空避免下游讀到前一個帳號的 dt
|
|
401
|
+
clearDeviceToken: assign({ dt: null }),
|
|
399
402
|
setAccount: assign((context, event) => {
|
|
400
403
|
if (context.loginData.username) {
|
|
401
404
|
storage.remove(accountEmailKey)
|
|
@@ -430,7 +433,7 @@ export default function (request) {
|
|
|
430
433
|
path: '/',
|
|
431
434
|
maxAge: 300,
|
|
432
435
|
})
|
|
433
|
-
return { token: null }
|
|
436
|
+
return { token: null, dt: null }
|
|
434
437
|
}),
|
|
435
438
|
extendToken: assign((context, event) => {
|
|
436
439
|
const token = storage.get(tokenKey)
|