mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
* microsoft graph refresh token flow * Handled unauthorised error * marketplace dev mode will be picked from public config * for microsoft graph when datasource is updated clear the token details * added migration to backfill values for scope in Microsoft graph datasource * version bump
15 lines
648 B
TypeScript
15 lines
648 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class BackfillMicrosoftGraphDatasourceScopeToHaveOfflineAccessForRefreshToken1760693571486
|
|
implements MigrationInterface
|
|
{
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
UPDATE data_source_options
|
|
SET "options" = ("options"::jsonb || '{"scopes": {"value": "https://graph.microsoft.com/.default offline_access", "encrypted": false}}'::jsonb)::json
|
|
FROM data_sources ds
|
|
WHERE ds.id = data_source_id and ds.kind = 'microsoft_graph'`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
|
}
|