NbPasswordAuthStrategy redirect not working
- 主要语言
- TypeScript
- 星标
- 25.7k
- 派生
- 7.9k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello guys,
trying to implement the NbPasswordAuthStrategy. Here is my setup:
...NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
baseEndpoint: 'http://localhost:4000',
login: {
endpoint: '/login/',
method: 'get',
redirect: {
success: '/pages/dashboard',
failure: null,
},
},
})
],
forms: {
login: {}
},
}).providers,
Now when i receive a 200 status response from my endpoint, the app should redirect to 'pages/dashboard'. Actually the app is redirecting correctly but my Authguard redirects it back to login page since it thinks i am not authenticated:
.pipe(
tap(authenticated => {
if (!authenticated) {
console.log('not logged in -> redirect');
this.router.navigate(['auth/login']);
}
}),
);
Is there a bug with the NbPasswordAuthStrategy? Or am i missing something?
Any help would be very appreciated.
贡献指南
评估
这个 Issue 还没有评估数据。