We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to use the code as a base for a similar app, however, I encounter an issue that when I use the AuthService from another Service class,
this.auth.getUser always return null
ClassRoomService class async create(title, text) { console.log(title, text); const user = await this.auth.getUser(); if (user) { console.log(user); console.log(user.id); } else { console.log("user is null") } }
I wonder what is wrong with the code, would you be kind to give me some advice ?
Forgot to mention, I add a new function for anonymousLogin in AuthService
anonymousLogin() { return this.afAuth.auth.signInAnonymously() .then(() => console.log("successful login")) .catch(error => console.log(error)); }
In component script
this.authService.anonymousLogin().then(() => { console.log("in anonymousLogin"); this.classRoomService.create(this.act_title, this.act_text); --> the "async create function"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to use the code as a base for a similar app, however, I encounter an issue that when I use the AuthService from another Service class,
this.auth.getUser always return null
I wonder what is wrong with the code, would you be kind to give me some advice ?
Forgot to mention, I add a new function for anonymousLogin in AuthService
In component script
The text was updated successfully, but these errors were encountered: