Plumb expiration data through to OAuth tokens#7306
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Greptile OverviewGreptile SummaryThis PR adds OAuth token expiration data ( Key changes:
Critical issue found:
Confidence Score: 0/5
Important Files Changed
|
JadeCara
left a comment
There was a problem hiding this comment.
Approving with a comment that is not a blocker.
There will probably need to be a Fidesplus PR to accompany this one. There are a few places using create_access_code_jwe without passing in the token_expire_minutes.
| ) | ||
|
|
||
| return AccessToken(access_token=access_code) | ||
| expires_at = datetime.now() + timedelta(minutes=expire_minutes) |
There was a problem hiding this comment.
Not sure if this is worth updating now (especially because I think its all .now() in this file), but datetime.now() makes a naive date time. Its probably fine, but adding a timezone to it might be a good safeguard.
There was a problem hiding this comment.
It does, and I agree that we should; unfortunately I think we are a bit inconsistent about time zones - I am not sure if adding one in this case could make the calculations wrong because we use now() elsewhere in this file 😄
Undo moving session creation out of the lock Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Ticket ENG-2140
Description Of Changes
Tracks expiration data and calculates TTE for oauth tokens and adds that information to the response - the seconds until expiry and the expires at data
Code Changes
Steps to Confirm
None should be needed
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works