Skip to content

Provide common hooks for custom extensions of AuthUser #3709

Closed

Description

@tp

In case the developer wants to use a custom profile (or any other entity which should have a 1:1 relationship with an AuthUser) they would currently have to add their user profile migration / creation code in a bunch of places (e.g. the 2 variants of migrations, and the 2 variants of email sign ups (invites and registration)).

We should offer a common way to handle such side-effects, so that they would only have to register one function per package and can rely on the module to call into it whenever it's appropriate.

Related discussion: #3666 (comment)

Activity

  1. added
    area: authentication
    on Jun 24, 2025
  2. moved this to Later 🥳 in Serverpod Frameworkson Jun 24, 2025
  3. tp commented on Jun 24, 2025

    @tp
    ContributorAuthor

    Decision:

    • Flag for importProfile in migration is fine, but migration methods should receive enough information about the migration to do it themselves
    • Ensure transaction can be passed into the migration functions
    • For the email account endpoint we stick to letting the developer overwrite those methods in their subclass, where they can call directly into the underlying module
      • If they don't want to make use of the profile behavior, they should probably just write their own endpoint around serverpod_auth_email_account anyway, instead of wrangling the provided one into shape
  4. added a commit that references this issue on Jun 30, 2025
    75ff786
  5. moved this from Planned 🔭 to In Progress 🔥 in Serverpod Frameworkson Jun 30, 2025
  6. self-assigned this
    on Jun 30, 2025
  7. added 2 commits that reference this issue on Jun 30, 2025
    174b3c6
    9bb9610
  8. moved this from In Progress 🔥 to Done 🚀 in Serverpod Frameworkson Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: authentication

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions