akveo / akveo/nebular

refresh_token key on login??

Đang mở
#1,274 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
module:auth needs docs
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ả

Hey! It is rather more a question than an issue, but I haven't find a place where to ask, so I'm asking it here.

I have an endpoint, which returns a json object with keys in case of successful login:
```
{
token: "string",
refresh_token: "string"
}
```

I have configured the app using the next code:

```
export const NB_CORE_PROVIDERS = [
...DataModule.forRoot().providers,
...NbAuthModule.forRoot({

strategies: [
NbPasswordAuthStrategy.setup({
name: 'email', // email
baseEndpoint: 'https://mydomain.com/api',
login: {
endpoint: '/login',
method: 'post',
defaultErrors: ['Wrong combination of email/password!'],
defaultMessages: ['You have successfully logged in!'],
},
token: {
key: 'token',
}
}),
],
forms: {
login: {
back: false,
},
},
}).providers,

NbSecurityModule.forRoot({
accessControl: {
guest: {
view: '*',
},
user: {
parent: 'guest',
create: '*',
edit: '*',
remove: '*',
},
},
}).providers,

{
provide: NbRoleProvider, useClass: NbSimpleRoleProvider,
},
AnalyticsService,
];
```

There is a key that can be set for the `token` key, but there is no way to set a configuration for the `refresh_token` key.
Have I missed something?

The application stores the token and successfully loggs in, but the refresh_token is not stored on successful login.
How do I fix this?

Thank you in advance!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.