update oauth example to use new api