TypeError: options.headers.hasOwnProperty is not a function
at new Response (/home/*/api/node_modules/oauth2-server/lib/response.js:16:25)
at /home/*/api/node_modules/ubx-koa2-oauth2-server/index.js:61:30
at dispatch (/home/*/api/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)
at next (/home/*/api/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)
at routes.get (/home/*/api/src/routes.js:42:14)
.....
Add the popular cors module to your koa setup, or add a middleware changing the headers
Will instantly result in
Related issues with oauth2-server
https://github.com/oauthjs/node-oauth2-server/pull/430 https://github.com/oauthjs/node-oauth2-server/issues/413