You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The user management should allow creating users through an endpoint. The user structure should look similar to this:
ID uuid.UUID `json:"id" db:"id"`
Aud string `json:"aud" db:"aud"`
Role string `json:"role" db:"role"`
Username *string `json:"username" db:"username"` # One of the following must be set if not anonymous
Email *string `json:"email" db:"email"`
Phone *string `json:"phone" db:"phone"`
Image *string `json"image" db:"image"`
EncryptedPassword *string `json:"-" db:"encrypted_password"`
LastSignInAt *time.Time `json:"last_sign_in_at" db:"last_sign_in_at"`
AppMetaData JSON `json:"app_metadata" db:"raw_app_meta_data"`
UserMetaData JSON `json:"user_metadata" db:"raw_user_meta_data"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
DeletedAt *time.Time `json:"deleted_at" db:"deleted_at"`
IsAnonymous bool `json:"is_anonymous" db:"is_anonymous"`
Normal API Endpoints:
GET /api/users/me
Retrieves the currently logged-in user's information
Admin API Endpoints:
POST /api/admin/users
Creates a new user.
Requires at least one of the following: username, email, or phone (unless is_anonymous is true).
encrypted_password is required if is_anonymous is false.
Returns the newly created user object upon success.
POST /api/admin/users
Creates a new user with any specified role.
Requires the same fields as the normal user creation endpoint, but also allows setting the role field explicitly.
Returns the newly created user object upon success.
User Management Endpoints for listing, retrieving, updating, and deleting users. (e.g., GET /api/admin/users, GET /api/admin/users/:id, PUT /api/admin/users/:id, DELETE /api/admin/users/:id)
The text was updated successfully, but these errors were encountered:
User Management - First Iteration
Normal API Endpoints:
Admin API Endpoints:
POST /api/admin/users
username
,email
, orphone
(unlessis_anonymous
is true).encrypted_password
is required ifis_anonymous
is false.POST /api/admin/users
role
.role
field explicitly.User Management Endpoints for listing, retrieving, updating, and deleting users. (e.g., GET /api/admin/users, GET /api/admin/users/:id, PUT /api/admin/users/:id, DELETE /api/admin/users/:id)
The text was updated successfully, but these errors were encountered: