Skip to content

authz: utilize expired_at and last_valid_at columns of user_external_accounts

Administrator requested to merge jc/permsSyncer-expired-last-valid into main

Created by: unknwon

This PR does two things in the PermsSyncer:

  • When successfully used a token from user_external_accounts, we update the last_valid_at column.
  • Otherwise, update the expired_at column.

Part of #14899

TODOs

  • Implements errcode.IsUnauthorized for GitHub and GitLab errors
  • Add tests for db.ExternalAccounts
  • Add tests for PermsSyncer

Merge request reports

Loading