Open JaneDawson opened 7 years ago
I'm not sure how you would access the current user id without it being stored on the device. I'll have to look into this more, but I can see how it would be useful. Anyone with ideas for this feature is welcome to leave feedback. Thanks!
In my humble opinion and before this grows into a monster of a module, I suggest that storing authentication info is up to the consumer. The scope of this module should simply be offline data.
The more features you add, the more features there is to maintain.
edit Re-reading this, it sounds like I was telling. Sorry! Mean to only suggest it. 😄
That would be great, yes.
I guess we should have some kind of AfoAuth
service.
We would use it like
import { AngularFireOfflineAuth } from 'angularfire2-offline/auth';
@Injectable()
export class someService {
constructor(private afoAuth: AngularFireOfflineAuth) {
afoAuth.authState.subscribe(user => {
console.log(user);
});
}
}
And I'm not too sure about how it would work behind the scene, but I guess in the same way as database, by storing locally the latest fetched datas and then use those datas as default before trying to fetch remote datas ?
firebase already stores the auth user in localstorage
Thank you for this fantastic module!
How would you deal with the authentification to get the current user Id? Would you somehow have to add offline support for it, as well? Up to now I used AngularFireAuth (
import { AngularFireAuth } from 'angularfire2/auth';
).Thanks and best regards