fief-dev / fief

Users and authentication management SaaS
https://www.fief.dev
Other
486 stars 42 forks source link

Let User field to be required to be unique #380

Closed fubuloubu closed 1 month ago

fubuloubu commented 1 month ago

Describe the bug

If you want to add a field that should be globally unique (within a tenent) such as a username, it is currently not possible to specify that

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'User fields'
  2. Click on 'Create User Field'
  3. No way to add unique constraint on field

Expected behavior

A checkbox in this form that adds a UNIQUE constraint on the field should be available, at least on some field types such as string, phone number, maybe address, etc.

Configuration

Additional context

I want to protect the privacy of my user's emails by only allowing account search via username

fief-bailiff[bot] commented 1 month ago

Hail, @fubuloubu 👋 Welcome to Fief's kingdom!

Our team will get back to you very soon to help.

In the meantime, take a minute to star our repository ⭐️

star-fief

Want to support us?

Subscribe to one of our paid plan to help us continue our work and receive exclusive information and benefits! Starts at $5/month 🪙

Subscribe

Farewell!