Files
outline/server/migrations/20260215215401-update-oauth-clients.js
T
Tom Moor 957648a588 feat: OAuth dynamic client registration (#11462)
* feat: DCR first pass

* Add cleanup task, management endpoints

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* wip

* Combine migrations

* Self review

* fix: Guard OAuth policies

* fix: Application access list not updating on deletion

* feat: Add OAUTH_DISABLE_DCR env var to disable dynamic client registration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Validate max length of redirect URIs in DCR schemas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Self review

* Use withCtx methods for correct event creation

* Remove incorrect scopes_supported

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 17:30:19 -05:00

60 lines
1.4 KiB
JavaScript

"use strict";
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.sequelize.transaction(async (transaction) => {
await queryInterface.changeColumn(
"oauth_clients",
"createdById",
{
type: Sequelize.UUID,
allowNull: true,
},
{ transaction }
);
await queryInterface.addColumn(
"oauth_clients",
"lastActiveAt",
{
type: Sequelize.DATE,
allowNull: true,
},
{ transaction }
);
await queryInterface.addColumn(
"oauth_clients",
"registrationAccessTokenHash",
{
type: Sequelize.STRING,
allowNull: true,
unique: true,
},
{ transaction }
);
});
},
async down(queryInterface, Sequelize) {
await queryInterface.sequelize.transaction(async (transaction) => {
await queryInterface.removeColumn(
"oauth_clients",
"registrationAccessTokenHash",
{ transaction }
);
await queryInterface.removeColumn("oauth_clients", "lastActiveAt", {
transaction,
});
await queryInterface.changeColumn(
"oauth_clients",
"createdById",
{
type: Sequelize.UUID,
allowNull: false,
},
{ transaction }
);
});
},
};