(e: MessageEvent)
| 227 | ); |
| 228 | |
| 229 | const onLoginMessage = async (e: MessageEvent) => { |
| 230 | if (e.data?.eventKey !== AuthEvent.Login) { |
| 231 | return; |
| 232 | } |
| 233 | |
| 234 | const { data: boot } = await refetchBoot(); |
| 235 | |
| 236 | if (boot.user) { |
| 237 | onUpdateSignBack( |
| 238 | boot.user as LoggedUser, |
| 239 | providerProp as SignBackProvider, |
| 240 | ); |
| 241 | } |
| 242 | |
| 243 | onSuccessfulLogin?.(); |
| 244 | }; |
| 245 | |
| 246 | useEventListener(globalThis, 'message', onLoginMessage); |
| 247 |
nothing calls this directly
no test coverage detected