some oauth config refactoring