This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi,
I have a users collection and would like to be able to show who is logged into my mobile app. Is there a trigger available that I could hook into and update the users record when their session expires? I can handle manual logout no problem but if the user just never logs into the app again they will be shown as logged in even when they are not.
I am looking for something a little like my create trigger.....
export const createUserRecord = functions.auth
.user()
.onCreate((user, context) => {
const userRef = db.doc(`users/${user.uid}`);
return userRef.update({
createdAt: context.timestamp,
});
});
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Firebase/co...