yup-oauth2 is a utility library which will implement oauthv2 device authentication suitable for yup to work.
It is implemented such that it makes no assumptions about the front-end, allowing more uses than just in yup.
Architecturally, it may never be implementing more than device authentication, yet is set up not to constrain itself.