OAuth2 middleware for wai