[PoC][WIP] Rewrite OAuth plugin