Closed Bug 2015671 Opened 9 months ago Closed 9 months ago

Desktop should track oauth access token expiry and avoid returning expired tokens

Categories

(Firefox :: Firefox Accounts, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: markh, Assigned: markh)

References

Details

(Whiteboard: [fxsync-])

Attachments

(1 external file)

We currently don't track expiry of oauth access tokens. The Rust component does and it seems to work fine, so let's start doing that in desktop too.

This isn't going to mean that people using the tokens can blindly assume they are good though - there are still reasons they will not be, including clock skew etc. So consumers must still know to handle a 401 and discard the token before asking for a new one - but this would mean they need to actually do that far less often.

This just mirrors the strategy the Rust fxa component uses. The implementation is quite
simple because we were already storing cached tokens as an object (ie, as {token: 'xxx'}), so it's quite simple to add expiresAt` to that object without changing the format of the
cached data.

Assignee: nobody → markh
Status: NEW → ASSIGNED
See Also: → 2015116
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
See Also: → 2018918
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: