Nebular Login not redirecting if already logged in
- 主要语言
- TypeScript
- 星标
- 8.1k
- 派生
- 1.5k
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Issue type
**I'm submitting a ...** (check one with "x")
* [ ] bug report
* [x] feature request
### Issue description
**Current behavior:**
Login component not redirecting if already logged in. For example, you log in, you get redirected to some page, then if you go by url to Login again, you can login again, even if you did not log out and so on (the token is also still there)
**Expected behavior:**
Redirect to success redirect specified page if the user is authenticated
**Steps to reproduce:**
Login, and navigate again to login page and you will be able to login as many times as you wish
**Related code:**
```
NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
token: {
class: NbAuthJWTToken,
key: 'my_token'
},
baseEndpoint: environment.connectCoreUri,
login: {
endpoint: 'api/login',
method: 'post',
redirect: {
success: 'auth/success',
failure: null,
},
}
}),
],
forms: {},
})
```
### Other information:
**npm, node, OS, Browser**
```
Angular 6 all browsers
```
**Angular, Nebular**
```
Latest version of nebular
```
贡献指南
评估
这个 Issue 还没有评估数据。