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

Function onLoginMessage

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

onSuccessfulLoginFunction · 0.85

Tested by

no test coverage detected