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