that's how to configure it in your front-end to support JWT.
Of course your back-end should support it, and you can configure your routes as you wish, this is just an example
export const NB_CORE_PROVIDERS = [
...DataModule.forRoot().providers,
...NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
name: 'email',
baseEndpoint:"http://localhost:8080/api/",
requestPass:false,
logout:{
endpoint:'auth/logout',
method:'post',
requireValidToken:true
},
resetPass:{
endpoint:"auth/reset",
redirect:{
success:"/",
failure:"/auth/login"
}
},
refreshToken:{
endpoint:'auth/refresh',
method:"post"
},
login: {
endpoint: 'auth/login',
method:"post",
redirect:{
success:"/pages"
},
requireValidToken:true
},
token: {
class: NbAuthJWTToken,
key:'token'
}
}),
],