Skip to content

Using setUserField might lead to an unbounded number of keys #126

Description

@nesro

Hi Julian,

as I was debugging my changes for #125

I've noticed that this line:

await db.setObjectField(`${payload.name}Id:uid`, payload.oAuthid, uid);

( https://github.com/NodeBB/nodebb-plugin-sso-oauth2-multiple/blob/main/library.js#L251 ) will add a key to a single mongo document for each user.

I'm afraid that when there will be hundreds of thousands users, things might be slow or even break. Is my concern valid, or is it handled somewhere?

Thanks,
Tomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions