This is probably very broken on macOS and Windows and will need a lot of work to complete fully.
Both act as the first step of AuthContext.