follow linkedin and reddit examples for oauth 2.0 workflow