Refactor OAuth into a Reddit extension.