Use defaultEnvironment to detect which authentication method to use