Add type annotations and comments to the auth handler.