The auth functions are a bloody mess and need to be cleaned up.
using various callback functions and using variables as pointers makes the logic
hard to follow and hence idiotic to type too, as multiple orthogonal logic paths
are mixed up into one function.
This really needs to be untangled
The sort event bundled networks and channels for no reason at all.
They share none of the actual logic, so combining them just makes
the typing poor but serves no benefit.
There were quite some errors, where the type was passed the wrong way
```
// This is invalid
"change-password": ({ old_password: string, new_password: string, verify_password: string})
// What was actually meant
"change-password": (data: { old_password: string, new_password: string, verify_password: string})
```
The whole callback function is also very verbose as is, with fluff we don't need.
It's always a function that returns void, so there's no real information to be gained
by spelling it out time and time again.
Let's use a helper type that just accepts the payload.
That should make the above error impossible to do.
Overriding the built in is poor form, as this prevents adding
a new type handler with its own normalize handler.
We only ever want to override protocol-less URLs to http, so
we just do so explicitly in the "//" schema normalizer.
This also means that we don't need all that type conversion dance,
we simply set the schema to null when we patch it and filter on the
schema directly