There are many gotchas in this process and unfortunately there is no easy way to deal with the OAuth setup.