Background:
This is really a general best-practices question, but some background about the specific situation might be helpful:
We are deve
You should implement:
which are exactly the workflows, from OAuth2, that you are looking for. Do not reinvent the wheel.