Custom token keys for NbAuth0Auth2JWTToken
- 主要语言
- TypeScript
- 星标
- 8.1k
- 派生
- 1.5k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Issue type
**I'm submitting a ...**
* [x] feature request
### Issue description
**Current behavior:**
If using `NbAuth0Auth2JWTToken` with `NbPasswordAuthStrategy`, the server must respond with the schema hardcoded to `{ token: { access_token: "someval", refresh_token: "someval" } }` for `login` request and `refreshToken` requests both.
**Expected behavior:**
Let us specify the schema in which the server returns the access and refresh tokens for both login and refresh-token endpoints.
**Related code:**
If my backend returns this: `{ token: { access: "someval", refresh: "someval" } }` - _Default schema if using djangorestframework-simplejwt_
In the password strategy, I should be able to define something like:
```
token: {
class: NbAuthOAuth2JWTToken,
accessTokenKey: 'access',
refreshTokenKey: 'refresh'
}
```
### Other information:
**npm, node, OS, Browser**
```
Node, npm: `12.18.0`
OS: Manjaro Linux.
Browser: Chrome/Firefox.
```
**Angular, Nebular**
```
Angular: v9.1.9, Nebular v5.1.0
```
贡献指南
评估
这个 Issue 还没有评估数据。