Function signup

Source
pub async fn signup(
    session: Session,
    payload: Json<CreateAccountDetails>,
    pool: Data<PgPool>,
    client: Data<OAuthClient>,
    user: Option<AuthUser>,
    app_conf: Data<ApplicationConfiguration>,
    tmc_client: Data<TmcClient>,
) -> ControllerResult<HttpResponse>
Expand description

POST /api/v0/auth/signup Creates new mooc.fi account and signs in.

ยงExample

POST /api/v0/auth/signup HTTP/1.1
Content-Type: application/json

{
  "email": "student@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "language": "en",
  "password": "hunter42",
  "password_confirmation": "hunter42",
  "country" : "Finland",
  "email_communication_consent": true
}