Skip to content
New issue

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

Trigger profile.deleteCache(uid) from subhub messaging? #2799

Closed
lmorchard opened this issue Oct 8, 2019 · 2 comments

Comments

@lmorchard
Copy link
Member

commented Oct 8, 2019

Noticed that lib/subhub/updates.js in auth-server just calls db.createAccountSubscription and db.deleteAccountSubscription.

Meanwhile, the API route that handles creating a subscription does a few more things to notify services and invalidate the profile-server cache:

        await db.createAccountSubscription({
          uid,
          subscriptionId,
          productId,
          createdAt: Date.now(),
        });

        const devices = await request.app.devices;
        await push.notifyProfileUpdated(uid, devices);
        log.notifyAttachedServices('profileDataChanged', request, {
          uid,
          email,
        });
        await profile.deleteCache(uid);

Should we add these things to the subhub message processing? I'm wondering if maybe there will be a lag in subscription deletion being reflected in the userinfo endpoint data from profile-server - i.e. subscriptions will be reported as active longer than they should after automated cancellation

@bbangert

This comment has been minimized.

Copy link
Member

commented Oct 9, 2019

Yes, I think they should be added to the subhub message handling.

@bbangert

This comment has been minimized.

Copy link
Member

commented Oct 15, 2019

Fixed by #2895.

@bbangert bbangert closed this Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.