MCPcopy Create free account
hub / github.com/dailydotdev/apps / onLoginMessage

Function onLoginMessage

packages/shared/src/hooks/useLogin.ts:223–238  ·  view source on GitHub ↗
(e: MessageEvent)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

onSuccessfulLoginFunction · 0.85

Tested by

no test coverage detected