Add oauth and environment checks