authentication

Deanonymize an anonymous user

Changed on

Convert an anonymous user to a regular user by adding email and optionally password credentials. A confirmation email will be sent if the server is configured to do so.

post/user/deanonymize

Request

  • Base URL
    https://{subdomain}.auth.{region}.nhost.run/v1
  • URL
    https://{subdomain}.auth.{region}.nhost.run/v1/user/deanonymize
  • Auth
    HTTP bearer

Request body

signInMethod'email-password' | 'passwordless' required

Which sign-in method to use

emailstring email required

A valid email

passwordstring

A password of minimum 3 characters

connectionstring

Deprecated, will be ignored

codeChallengestring

PKCE code challenge (S256). When provided, the verification redirect will contain an authorization code instead of a refresh token.

Example request

{
  "email": "john.smith@nhost.io",
  "password": "Str0ngPassw#ord-94|%",
  "options": {
    "allowedRoles": [
      "me",
      "user"
    ],
    "defaultRole": "user",
    "displayName": "John Smith",
    "locale": "en",
    "metadata": {
      "firstName": "John",
      "lastName": "Smith"
    },
    "redirectTo": "https://my-app.com/catch-redirection"
  }
}

Response

User deanonymized successfully

'OK' required

Changes

    • warning

      added the new otp-too-many-attempts enum value to the response property for the response status

    • warning

      added the new user-already-exists enum value to the response property for the response status

    • info

      removed the email-already-in-use enum value from the response property for the response status