[to rebase] [WIP] allow multiple grant types