aurelia auth логин проблема
У меня есть следующая проблема с aurelia-auth, вот обычный фрагмент логина, который я использую:
login() {
return this.authService.login(this.email, this.password)
.then(response => {
console.log("Login response" + JSON.stringify(response));
})
.catch(err => {
this.loginError = err.response;
});
};
Когда я пытаюсь войти в систему, я вижу желаемый вывод на консоль, но также появляется сообщение "login route: /login" от authorizeStep.js:38, в котором говорится, что я на самом деле не аутентифицирован
Мой auth-config:
var config = {
baseUrl: '',
loginUrl:'http://localhost:8888/rest-auth/login/',
signupUrl: 'http://localhost:8888/rest-auth/registration/',
loginRedirect: '#/contests',
logoutRedirect: '/',
tokenName: 'key',
authHeader: 'Authorization',
authToken: 'Token',
storage: 'sessionstorage'
}
export default config;
app.js:
import {inject} from 'aurelia-framework';
import {Router} from 'aurelia-router';
import AppRouterConfig from 'router-config';
import HttpClientConfig from 'aurelia-auth/app.httpClient.config';
import {FetchConfig} from 'aurelia-auth';
@inject(Router, HttpClientConfig, FetchConfig, AppRouterConfig)
export class App {
constructor(router, httpClientConfig, fetchConfig, appRouterConfig {
this.router = router;
this.httpClientConfig = httpClientConfig;
this.appRouterConfig = appRouterConfig;
this.fetchConfig = fetchConfig;
}
activate() {
this.httpClientConfig.configure();
this.appRouterConfig.configure();
this.fetchConfig.configure();
}
}
Любая помощь будет оценена