New filters on the Home Feed, take a look!
view details

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.

1
Is there a trigger that fires when a user is signs out or their session expires?
Post Body

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,
});
});

Author
Account Strength
90%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
691
Link Karma
293
Comment Karma
398
Profile updated: 4 days ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago