---
title: "Convert user from password to oauth authentication"
method: POST
path: "/api/v2/users/{user}/convert-login"
tags: ["Authorization"]
---

# Convert user from password to oauth authentication

`POST /api/v2/users/{user}/convert-login`

## Path parameters

- `user` string, required

## Request body

- CodersdkConvertLoginRequest
  - `password` string, required
  - `to_type` '' | 'password' | 'github' | 'oidc' | 'token' | 'none', required

## Response `201`

Created

- CodersdkOAuthConversionResponse
  - `expires_at` string, date-time
  - `state_string` string
  - `to_type` '' | 'password' | 'github' | 'oidc' | 'token' | 'none'
  - `user_id` string, uuid

---

[API](https://skmtc.net/coder/apis/coder-api.md) · [All operations](https://skmtc.net/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coder/coder-api/versions/56b6e9f08540/schema)
