diff --git a/src/room/RoomPage.tsx b/src/room/RoomPage.tsx index e8b3fa9a..f4e460d7 100644 --- a/src/room/RoomPage.tsx +++ b/src/room/RoomPage.tsx @@ -50,9 +50,9 @@ export const RoomPage: FC = () => { const [isRegistering, setIsRegistering] = useState(false); useEffect(() => { - // If we're not already authed and we've been given a display name as + // If we've finished loading, are not already authed and we've been given a display name as // a URL param, automatically register a passwordless user - if (!isAuthenticated && displayName) { + if (!loading && !isAuthenticated && displayName) { setIsRegistering(true); registerPasswordlessUser(displayName).finally(() => { setIsRegistering(false); @@ -63,6 +63,7 @@ export const RoomPage: FC = () => { displayName, setIsRegistering, registerPasswordlessUser, + loading, ]); const groupCallView = useCallback(