diff --git a/app/custom-oauth/server/custom_oauth_server.js b/app/custom-oauth/server/custom_oauth_server.js index 9276b5dfbab4..0651de35a69a 100644 --- a/app/custom-oauth/server/custom_oauth_server.js +++ b/app/custom-oauth/server/custom_oauth_server.js @@ -225,6 +225,12 @@ export class CustomOAuth { identity.id = identity.sub; } + // Fix OpenShift identities where id is in 'metadata' object + if (!identity.id && identity.metadata && identity.metadata.uid) { + identity.id = identity.metadata.uid; + identity.name = identity.fullName; + } + // Fix general 'userid' instead of 'id' from provider if (identity.userid && !identity.id) { identity.id = identity.userid;