Need to refactor the code to work with all valid grant flows.
Need to refactor the code to work with all valid grant flows.