Skip to main content

Allows you to skip entering your email after registering via EVE SSO

Project description

AA Skip Email (aa_skip_email)

A small Alliance Auth plugin that lets you skip collecting real email addresses during EVE SSO registration by automatically generating a placeholder User.email. This is useful for integrations (e.g., OIDC clients) that expect email to be present.


Features

  • Creates a placeholder email for newly created users during SSO registration.
  • Includes a one-off Django management command to backfill missing emails.
  • Includes a Celery task suitable for periodic execution to keep data consistent.

Requirements

  • Alliance Auth

Installation

Install the plugin into the same Python environment as Alliance Auth (pip/uv/poetry-whatever you use).

pip install aa-skip-email

Add the app to INSTALLED_APPS (typically in local.py):

INSTALLED_APPS += [
    ...
    "aa_skip_email",
    ...
]

Add the authentication backend to AUTHENTICATION_BACKENDS.

[!IMPORTANT] This plugin replaces Alliance Auth’s default allianceauth.authentication.backends.StateBackend behavior. Update AUTHENTICATION_BACKENDS so that SkipEmailBackend is used instead of the original AA StateBackend.

Example:

AUTHENTICATION_BACKENDS = [
    # Replace the original AA StateBackend with this plugin backend
    "aa_skip_email.authentication.backends.SkipEmailBackend",
    # Keep the rest of your original backends
    "django.contrib.auth.backends.ModelBackend",
]

Configuration

Configure these in local.py (or your equivalent settings file).

AA_SKIP_EMAIL_DOMAIN

Domain used for placeholder addresses.

  • Type: str
  • Default: no-email.invalid
AA_SKIP_EMAIL_DOMAIN = "no-email.invalid"

Using a domain under .invalid helps avoid accidentally generating addresses at a real domain.

AA_SKIP_EMAIL_LIMIT

Default limit for how many users are processed per run by the management command and the Celery task.

  • Type: int
  • Default: 5000
AA_SKIP_EMAIL_LIMIT = 5000

How placeholder emails are generated

A placeholder email is generated from the user’s username (sanitized to a conservative character set) and a unique suffix (typically the user id; otherwise a UUID). The local-part is kept within 64 characters.

Resulting format is similar to:

<sanitized-username>-<id-or-uuid>@<AA_SKIP_EMAIL_DOMAIN>

One-off backfill (management command)

The plugin provides a Django management command to fill missing emails.

Fill missing emails (default)

python manage.py fill_missing_emails

Limit number of users

python manage.py fill_missing_emails --limit 5000

Dry-run (no writes)

python manage.py fill_missing_emails --dry-run --limit 50

Overwrite emails for all users

[!CAUTION] This will replace existing emails.

python manage.py fill_missing_emails --overwrite

Overwrite only existing placeholders

Safer if some users have real emails and you only want to regenerate placeholders.

python manage.py fill_missing_emails --overwrite --only-placeholders

Scheduler (Celery Beat)

The plugin includes a Celery task named:

  • aa_skip_email.fill_missing_emails

To run it periodically, add a schedule entry in local.py using CELERYBEAT_SCHEDULE.

Example: run every 6 hours

from celery.schedules import crontab

CELERYBEAT_SCHEDULE["aa_skip_email_fill_missing_emails"] = {
    "task": "aa_skip_email.fill_missing_emails",
    "schedule": crontab(minute=0, hour="*/6"),
    # Optional: helps spread load across instances in some AA deployments
    "apply_offset": True,
}

Example: run daily at 04:15

from celery.schedules import crontab

CELERYBEAT_SCHEDULE["aa_skip_email_fill_missing_emails"] = {
    "task": "aa_skip_email.fill_missing_emails",
    "schedule": crontab(minute=15, hour=4),
    "apply_offset": True,
}

See also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aa_skip_email-0.2.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aa_skip_email-0.2.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file aa_skip_email-0.2.2.tar.gz.

File metadata

  • Download URL: aa_skip_email-0.2.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Gentoo","version":"2.18","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aa_skip_email-0.2.2.tar.gz
Algorithm Hash digest
SHA256 acb74b6d6f28b0dba8808f9fad605ea6011bf8925f51197866af861ce62375c1
MD5 ddf549b77e18af2f940d78ab49a7d986
BLAKE2b-256 e7416950e934f8f236a7c276f6f6254cad43e5039f202585a10f5d72af56bbc4

See more details on using hashes here.

File details

Details for the file aa_skip_email-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: aa_skip_email-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Gentoo","version":"2.18","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aa_skip_email-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd9233797431c5dca0932bb0ca5d040c6105a20bd3cd8b54eb55369e5413ec37
MD5 def23ec8021f53b85bd4b2f569f128e5
BLAKE2b-256 602123a11183f4c2073e2e2491022aa19684a372f7054491b3c68c31baab90bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page