Skip to content

Conversation

@WilsonLe
Copy link
Owner

@WilsonLe WilsonLe commented May 8, 2025

No description provided.

@WilsonLe WilsonLe linked an issue May 8, 2025 that may be closed by this pull request
@WilsonLe WilsonLe merged commit 4f672c1 into main May 8, 2025
3 checks passed
@WilsonLe WilsonLe deleted the allow-custom-subfield branch May 8, 2025 00:18
@marcusforsberg
Copy link

Hi @WilsonLe, thanks for this excellent plugin, it was a breeze to setup!

I just tried the subField option but from what I can see that config option isn't actually being applied anywhere. The below has no effect, except for it using googleId as the name instead of sub:

subField: {
    name: 'googleId',
    label: 'Google ID',
    type: 'text',
    index: true,
    admin: {
      hidden: true,
      access: {
        read: () => true,
        create: () => true,
        update: () => false,
      }
    }
},

I guess it's this part of modify-auth-collection.ts that should take subField into account:

 if (!existingSubField) {
    fields.push({
      name: subFieldName,
      type: "text",
      index: true,
      access: {
        read: () => true,
        create: () => true,
        update: () => false,
      },
});

Would you like me to open an issue and/or PR for this?

@WilsonLe
Copy link
Owner Author

@marcusforsberg Good catch, would be great to have an issue for this, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sub Field Visible

3 participants