Minor Changes
- 7c8f092: use the same methods and typings to interact with xstate machines in both
@nhost/hasura-auth-js
,@nhost/react
hooks and@nhost/vue
composables
Both@nhost/react
,@nhost/hasura-auth-js
and@nhost/vue
interact with the authentication state in a similar way. As a result, the same code was repeated three times, with risks of insonsistency and difficult maintainability.@nhost/core
now contains the logic and Typescript interfaces that are used in the Vanilla client, React hooks and Vue composables.
Patch Changes
- 7c8f092: Move the event payload validation away from the state, but into services and context
Field validation was reflected in a substate in the auth machine. It did not bring clear added value as information about errors were already stored in the machine context, while it complexified the machine definition.
Theerror
state is now childless, while field validation occurs in the corresponding services.