akveo / akveo/nebular

nebular auth making request with OPTION method not POST

未关闭
#1,883 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug module:auth needs triage
主要语言
TypeScript
星标
8.1k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

### Issue type

**I'm submitting a ...** (check one with "x")

* [ x] bug report
* [ ] feature request

### Issue description

**Current behavior:**

Auth module making request with OPTION method not POST even i have define post method in strategies.

**Expected behavior:**

it should make request using post method so that i can debug which fields are being sent to server.
**Steps to reproduce:**

**Related code:**

```
NbPasswordAuthStrategy.setup({
name: 'email',
baseEndpoint: 'http://127.0.0.1:8000/api',
token: {
class: NbAuthJWTToken,
key: 'token',
},
login: {
endpoint: '/auth/sign-in',
method: 'post',
redirect: {
success: '/dashboard/',
failure: null,
},
defaultErrors: ['Unable to login, please try again.'],
},
register: {
endpoint: '/auth/sign-up',
method: 'post',
redirect: {
success: '/mailbox/',
failure: null,
},
},
logout: {
endpoint: '/auth/sign-out',
method: 'post',
},
requestPass: {
endpoint: '/auth/request-pass',
method: 'post',
},
resetPass: {
endpoint: '/auth/reset-pass',
method: 'post',
},
validation: {
fullName: {
required: true,
minLength: 4,
maxLength: 50,
},
}
}),
],
forms: {},
})
```

### Other information:

**npm, node, OS, Browser**
```

Node, npm: `node --8.1.3` and `npm --6.4.1`
OS: Windows 10
Browser: Chrome
```
![sssss](https://user-images.githubusercontent.com/8913078/62312493-be7e5800-b4a7-11e9-9fb6-d004f61df631.PNG)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。