profile library
This library provides tools for managing and creating user profiles in the Serverpod authentication core module.
Classes
- AuthUser
- AuthUserModel
- AuthUsers
- Management functions for auth users.
- UserProfileBaseEndpoint
- Base endpoint for user profile management.
- UserProfileConfig
- Configuration options for the user profile module.
- UserProfileData
- UserProfileModel
- UserProfiles
- Business logic for handling user profiles
- UserProfilesAdmin
- Admin operations complementing the end-user UserProfilesAdmin functionality.
Enums
- UserProfileImageType
- Defines the format of stored user images.
Extensions
- AuthenticationInfoAuthUserId on AuthenticationInfo
-
AuthUser
ID extension forAuthenticationInfo
- AuthUserScopes on AuthUserModel
- Scopes extension for AuthUserModel.
Functions
-
defaultUserImageGenerator(
UserProfileModel userInfo) → Future< Image> - The default UserImageGenerator, mimics the default avatars used by Google.
Typedefs
-
AfterUserProfileCreatedHandler
= FutureOr<
void> Function(Session session, UserProfileModel userProfile, {required Transaction transaction}) - Callback to be invoked with the new user profile after it has been created.
-
AfterUserProfileUpdatedHandler
= FutureOr<
void> Function(Session session, UserProfileModel userProfile, {required Transaction transaction}) - Callback to be invoked with the updated user profile after it has been updated.
-
BeforeUserProfileCreatedHandler
= FutureOr<
UserProfileData> Function(Session session, UuidValue authUserId, UserProfileData userProfile, {required Transaction transaction}) - Callback to be invoked with the new user profile data before it gets created.
-
BeforeUserProfileUpdatedHandler
= FutureOr<
UserProfileData> Function(Session session, UuidValue authUserId, UserProfileData userProfile, {required Transaction transaction}) - Callback to be invoked with the new user profile before it will be updated.
-
UserImageGenerator
= Future<
Image> Function(UserProfileModel userProfile) - Generates a default user image (avatar) for a user who hasn't uploaded a user image.
Exceptions / Errors
- AuthUserBlockedException
- AuthUserNotFoundException
- UserProfileNotFoundException
- Exception which is thrown when a user's profile could not be found.