Skip to content

Commit 012a987

Browse files
committed
fix(mobile): allow INITIALIZE event in authenticated/unauthenticated auth states
1 parent 8326430 commit 012a987

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

packages/mobile/src/machines/authMachine.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,15 @@ export const authMachine = setup({
223223
}
224224
}
225225
}
226+
},
227+
on: {
228+
INITIALIZE: {
229+
target: 'initializing',
230+
actions: assign({
231+
appId: ({ event }) => event.appId,
232+
error: null
233+
})
234+
}
226235
}
227236
},
228237
authenticated: {
@@ -272,6 +281,13 @@ export const authMachine = setup({
272281
}
273282
},
274283
on: {
284+
INITIALIZE: {
285+
target: 'initializing',
286+
actions: assign({
287+
appId: ({ event }) => event.appId,
288+
error: null
289+
})
290+
},
275291
LOGOUT: 'loggingOut'
276292
}
277293
},

0 commit comments

Comments
 (0)