useOnlineIdentityProps
const { create, isAuthenticationRequired, tokenExpiresInSeconds } = useOnlineIdentity();const onlineIdentity = create({appID: uuid(), enableDittoCloudSync: true});const ditto = new Ditto(onlineIdentity, '/path');......return <button onClick={() => ditto.auth.loginWithToken('my-token', 'my-provider')}>Authenticate</button> Copy
const { create, isAuthenticationRequired, tokenExpiresInSeconds } = useOnlineIdentity();const onlineIdentity = create({appID: uuid(), enableDittoCloudSync: true});const ditto = new Ditto(onlineIdentity, '/path');......return <button onClick={() => ditto.auth.loginWithToken('my-token', 'my-provider')}>Authenticate</button>
A hook for creating OnlineDitto identity objects. For creating OnlinePlayground identities, use {@link useOnlinePlaygroundIdentity} instead.
{@link useOnlinePlaygroundIdentity}
Example
A hook for creating OnlineDitto identity objects. For creating OnlinePlayground identities, use
{@link useOnlinePlaygroundIdentity}
instead.