Check for Missing User Info
If you have info capture enabled, the user can exist in an intermediate state where they are authenticated but haven’t finished the onboarding process.
This state indicates the user is authenticated but must still complete required information or steps before the session is fully established.
This guide is for the React SDK only
import { useDynamicContext, useIsLoggedIn } from '@dynamic-labs/sdk-react-core';
const MyComponent = () => {
const isLoggedIn = useIsLoggedIn();
const { userWithMissingInfo } = useDynamicContext();
let message = "";
if (userWithMissingInfo) {
message = "You are authenticated but need to complete the onboarding process.";
} else if (!isLoggedIn) {
message = "Please log in to continue.";
} else {
message = "You are logged in!";
}
return (
<div>
<p>{message}</p>
</div>
);
};