Autional Autional
API Reference GitHub autional.com →

POST /auth/register/oauth

Complete registration using the pending_token generated from the OAuth callback, create a user and automatically link the OAuth connection and provider information, returning a JWT token. The post-registration approval process is controlled by the tenant's membership policy. References: RFC 6749 §4.1, OWASP ASVS V2.2.

Authentication None application/json

Request Body

Schema: dto.RegisterByOAuthRequest

FieldTypeRequiredExampleConstraintsDescription
agree_terms boolean Yes
password string Yes length: 8–128
pending_token string Yes
phone string No
username string No length: 3–32

Responses

StatusDescriptionSchema
200Registration successful and automatically logged indto.RegisterByOAuthResponse
400Invalid request parameters or expired pending_tokengitee_com_linmes_authms_base_dto.SimpleResponse
500Internal server errorgitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.LoginByCodeResponse

FieldTypeRequiredExampleConstraintsDescription
access_token string No
expires_in integer No
is_new_user boolean No
refresh_token string No
token_type string No
user dto.UserInfo No
user_id string No User ID (redundant with User.ID for flat access)

dto.RegisterByOAuthResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.LoginByCodeResponse No
message string No
timestamp string No

dto.UserInfo

User basic information

FieldTypeRequiredExampleConstraintsDescription
created_at string No 2026-01-15T10:30:00Z Account creation time
email string No john@example.com Email
id string No usr_abc123 User ID
must_change_password boolean No False Password must be changed
password_expires_in integer No 30 Days until password expires
password_warning string No expiring Password warning: expiring/expired_grace/expired
phone string No 13800138000 Phone
status string No active Status
username string No john.doe Username

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No