mirror of
https://github.com/wassname/talk.git
synced 2026-08-07 11:29:44 +08:00
[CORL-750] SSO Migration Script Bug (#2715)
* fix: fixed bug with sso migration script * feat: refactored sso schema * fix: resolved issue with data race and migration/install ordering
This commit is contained in:
@@ -3,9 +3,8 @@ import * as settings from "coral-server/models/settings";
|
||||
import { GQLSSOAuthIntegrationTypeResolver } from "coral-server/graph/tenant/schema/__generated__/types";
|
||||
|
||||
function getActiveSSOKey(keys: settings.SSOKey[]) {
|
||||
return keys.find(
|
||||
key => Boolean(key.secret) && !key.deletedAt && !key.deprecateAt
|
||||
);
|
||||
// Any key that has been rotated cannot be the active key.
|
||||
return keys.find(key => !key.rotatedAt);
|
||||
}
|
||||
|
||||
export const SSOAuthIntegration: GQLSSOAuthIntegrationTypeResolver<
|
||||
|
||||
Reference in New Issue
Block a user