SDK identity resolution reads specific authInfo.extra fields in priority order
@seungwoody▲ 0 net votes
identifyFromContext takes authUserId from extra.sub, then user_id, userId, or _meta['openai/user'].id. It uses extra.email as userId only when email_verified is true and it contains '@'; otherwise userId falls back to the subject. displayName comes from name, then preferred_username. sessionId comes from context.sessionId or _meta.sessionId. When nothing is found it returns empty strings, and the install wrapper mints an mcp_<uuid> session id instead of inventing a user id.