Skip to content

pyxle-auth 0.4.0: flexible identity — sign in with username or email#2

Merged
shivamsn97 merged 1 commit into
mainfrom
feat/flexible-identity
Jul 6, 2026
Merged

pyxle-auth 0.4.0: flexible identity — sign in with username or email#2
shivamsn97 merged 1 commit into
mainfrom
feat/flexible-identity

Conversation

@shivamsn97

@shivamsn97 shivamsn97 commented Jul 6, 2026

Copy link
Copy Markdown
Member

Adds the identifier setting ("email" — the default, unchanged behavior — or "username") so apps can authenticate on a username instead of an email address.

  • Username mode: sign_up/sign_in take a username; the email-only flows (verification, password reset) simply go unused.
  • Schema migration 0004 carries email and username as nullable UNIQUE columns (SQLite/PostgreSQL/MySQL variants), so an app can also collect an optional email alongside a username.
  • Configurable username policy: length bounds, allowed-character pattern, and a reserved-name block-list (~90 names) to prevent impersonation and route collisions. Usernames are lowercase-normalised, so uniqueness is case-insensitive on every backend.
  • AuthService.username_available() plus a public availability endpoint.

Tests: 435 passed, including live PostgreSQL and MariaDB backends.

Adds the `identifier` setting ("email" default, "username") so apps can
authenticate on a username instead of an email. Username mode: sign_up/
sign_in take a username, email-only flows go unused, schema carries both
email and username as nullable UNIQUE columns. Includes username policy
(length/pattern/reserved-name block-list), lowercase normalisation,
AuthService.username_available(), and /auth/username-available. 435 tests
green against SQLite, PostgreSQL, and MariaDB.
@shivamsn97 shivamsn97 merged commit 73cb1fa into main Jul 6, 2026
7 checks passed
@shivamsn97 shivamsn97 changed the title feat(auth): flexible identity — username or email sign-in (0.4.0) pyxle-auth 0.4.0: flexible identity — sign in with username or email Jul 7, 2026
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.

1 participant