Custom token keys for NbAuth0Auth2JWTToken
- Ngôn ngữ chính
- TypeScript
- Star
- 8.1k
- Fork
- 1.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### 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
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.