Azard / egg-oauth2-server

:star2: OAuth2 server plugin for egg.js based on node-oauth2-server
MIT License
179 stars 45 forks source link

authenticate报错options.headers.hasOwnProperty is not a function #19

Closed acodercat closed 6 years ago

acodercat commented 6 years ago

追踪代码发现是ctx.response.headers.hasOwnProperty,hasOwnProperty不是一个函数。但是不知道怎么解决

Azard commented 6 years ago

这个问题应该已经 fix 了:https://github.com/Azard/egg-oauth2-server/issues/11 有更详细的信息吗,这个问题不应该在 2.0.4 版本出现。

acodercat commented 6 years ago

你的server.js的authenticate函数里面还是用了node-oauth2的Response

Azard commented 6 years ago

我知道了,我马上发个 2.0.5 版。

acodercat commented 6 years ago

好,谢谢

Azard commented 6 years ago

用 2.0.5 试试,已经发版了

acodercat commented 6 years ago

可以了,谢谢,建议在下次版本升级的时候把server.js的127行password后面的逗号去掉,有的版本会报错。可以给node-oauth2的作者提下这个问题,让他们更新

Azard commented 6 years ago

我已经去掉了,等我补下测试覆盖率再发个版