* chore: Store expiresAt on UserAuthentications. This represents the time that the accessToken is no longer valid and should be exchanged using the refreshToken * feat: Check and expire Google SSO * fix: Better handling of multiple auth methods Added more docs * fix: Retry access validation with network errors * Small refactor, add Azure token validation support * doc * test * lint * OIDC refresh support * CheckSSOAccessTask -> ValidateSSOAccessTask Added lastValidatedAt column Skip checks if validated within 5min Some edge cases around encrypted columns
33 lines
878 B
JavaScript
33 lines
878 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
await queryInterface.sequelize.transaction(async (transaction) => {
|
|
await queryInterface.addColumn("user_authentications", "expiresAt", {
|
|
type: Sequelize.DATE,
|
|
allowNull: true,
|
|
transaction
|
|
});
|
|
await queryInterface.addColumn("user_authentications", "lastValidatedAt", {
|
|
type: Sequelize.DATE,
|
|
allowNull: true,
|
|
transaction
|
|
});
|
|
});
|
|
},
|
|
down: async (queryInterface) => {
|
|
await queryInterface.sequelize.transaction(async (transaction) => {
|
|
await queryInterface.removeColumn(
|
|
"user_authentications",
|
|
"lastValidatedAt",
|
|
{
|
|
transaction
|
|
}
|
|
);
|
|
await queryInterface.removeColumn("user_authentications", "expiresAt", {
|
|
transaction
|
|
});
|
|
});
|
|
},
|
|
};
|