add duo support

/cc @ianstormtaylor like this?