bf8a5e6a11
in e2e, our test app has both. in such cases, the auth fails because the redirect URI does not match
19 lines
563 B
JavaScript
19 lines
563 B
JavaScript
'use strict';
|
|
|
|
exports.up = async function (db) {
|
|
const allApps = await db.runSql('SELECT * FROM apps');
|
|
|
|
for (const app of allApps) {
|
|
const manifest = JSON.parse(app.manifestJson);
|
|
// assume apps only have one of them
|
|
if (manifest.addons.oidc) {
|
|
await db.runSql('UPDATE oidcClients SET id=? WHERE id=?', [ `${app.id}-oidc`, app.id ]);
|
|
} else {
|
|
await db.runSql('UPDATE oidcClients SET id=? WHERE id=?', [ `${app.id}-proxyauth`, app.id ]);
|
|
}
|
|
}
|
|
};
|
|
|
|
exports.down = async function (db) {
|
|
};
|