我已经在Angular 6.0中编写了一个登录方法作为前端,并将Firebase编写为后端。我在控制台中可以看到登录成功,但是令牌并未自动保存在浏览器的本地存储中。
下面是我的代码。我是否明确需要写点东西?
谢谢。
import * as firebase from 'firebase';
export class AuthService {
signupUser(email: string, password: string) {
firebase.auth().createUserWithEmailAndPassword(email,password)
.catch(
error => console.log(error)
)
}
signinUser(email: string, password: string) {
firebase.auth().signInWithEmailAndPassword(email,password)
.then(
response => console.log(response)
)
.catch(
error => console.log(error)
)
}
}
答案 0 :(得分:0)
已解决:我正在浏览器中直接检查[chrome>开发人员工具>应用程序>存储>本地存储]。但是在上述相同路径中有一个称为IndexedDB的东西,它又具有firebaseLocalStorageDB,用于保存从firebase接收到的JWT。