Reconcile a JWT Using the External JWT Provider API

On this page

The Reconcile API logs in a user with a JWT that an external system issued. FusionAuth validates the JWT with an External JWT Identity Provider, then reconciles the user that the JWT represents. FusionAuth creates or updates the user, depending on the linking strategy of the Identity Provider.

The Reconcile API takes the same request and returns the same response as Complete the External JWT Login. The Reconcile API accepts only External JWT Identity Providers.

Caution

The External JWT Identity Provider works only through the API. The FusionAuth hosted login pages don't support the External JWT Identity Provider.

When FusionAuth has an Identity Provider for your provider, such as Facebook, or a generic one, such as OpenID Connect, use that Identity Provider and the /api/identity-provider/login endpoint instead.

When createRegistration is enabled for the Application in the Identity Provider, FusionAuth registers a user who has no RegistrationThe association between a User and an Application. for the Application. FusionAuth then assigns the default roles of the Application. When createRegistration is disabled, FusionAuth doesn't register the user, and the response has a 202 status code.

Request#

Send the JWT in data.token.

No Authentication Required
Reconcile a JWT
POST/api/jwt/reconcile
OpenAPI Spec

Request Headers#

X-Forwarded-For
  • Type: String
  • Optional

The IP address of the client that requests authentication. When FusionAuth has an IP address, FusionAuth stores the IP address in the login record of the user. When the request body includes ipAddress, FusionAuth uses the request body value instead of this header. Prefer the request body.

X-FusionAuth-TenantId
  • Type: String
  • Optional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon other values in the request or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Request Body#

applicationId
  • Type: UUID
  • Required

The Id of the Application the user logs in to. The Application must have External JWT login enabled.

data.token
  • Type: String
  • Required

The encoded JWT that the external system issued for the user. FusionAuth validates the JWT signature with the verification keys of the Identity Provider, then reconciles the user from the JWT claims.

data.refresh_token
  • Type: String
  • Optional

A refresh token from the external system. FusionAuth stores the value in the token field of the user's link to the Identity Provider. For more information, see the Link API.

encodedJWT
  • Type: String
  • Optional

An alias for data.token. Send the JWT in either field.

eventInfo
  • Type: Object
  • Optional

Information about the request. FusionAuth adds the information to the events the request triggers, as event.info. For more information, see Pass Context From API Requests to Webhooks.

eventInfo.data
  • Type: Object
  • Optional

An object that holds any JSON you choose, such as a trace Id. FusionAuth copies the object to event.info.data without changes.

eventInfo.deviceDescription
  • Type: String
  • Optional

A description of the end user's device. When this value is omitted, FusionAuth uses metaData.device.description.

eventInfo.deviceName
  • Type: String
  • Optional

The name of the end user's device. When this value is omitted, FusionAuth uses metaData.device.name.

eventInfo.deviceType
  • Type: String
  • Optional

The type of the end user's device. When this value is omitted, FusionAuth uses metaData.device.type.

eventInfo.ipAddress
  • Type: String
  • Optional

The IP address of the end user. When your server calls FusionAuth for the end user, set this value to the end user's IP address. When this value is omitted, FusionAuth uses ipAddress. When both values are omitted, FusionAuth uses the IP address of the client that sent the request.

eventInfo.os
  • Type: String
  • Optional

The operating system of the end user's device.

eventInfo.userAgent
  • Type: String
  • Optional

The user agent of the end user's browser.

identityProviderId
  • Type: UUID
  • Required

The unique Id of the Identity Provider that processes the login request.

connectionTestId
  • Type: String
  • Optional
  • Available since 1.65.0

The Id of a connection test, which the Start an Identity Provider Connection Test API returns. For more information, see Start an Identity Provider Connection Test.

ipAddress
  • Type: String
  • Optional

The IP address of the end user who logs in. When you leave out ipAddress, FusionAuth uses the X-Forwarded-For header, or the address of the last proxy that sent the request. FusionAuth stores the IP address in the user's login history.

metaData.device.description
  • Type: String
  • Optional

A human-readable description of the device.

metaData.device.lastAccessedAddress
  • Type: String
  • Optional

The IP address of the login request.

metaData.device.name
  • Type: String
  • Optional

A human-readable name of the device.

metaData.device.type
  • Type: String
  • Optional

The type of device. In 1.46.0 and later, the value can be any string. Before 1.46.0, the value must be one of the following types:

  • BROWSER
  • DESKTOP
  • LAPTOP
  • MOBILE
  • OTHER
  • SERVER
  • TABLET
  • TV
  • UNKNOWN
newDevice
  • Type: Boolean
  • Optional
  • Defaults to false

Whether the user has never logged in from the device. FusionAuth uses the value as one signal when deciding whether to issue an MFA challenge for Intelligent MFA or the MFA Requirement Lambda. When true, FusionAuth also sends the New Device Webhook.

noJWT
  • Type: Boolean
  • Optional
  • Defaults to false

When true, FusionAuth doesn't issue a JWT. The response body has no token field, and FusionAuth doesn't write the access_token and refresh_token cookies.

When you send many login requests and don't use the JWT, set noJWT to true. FusionAuth then skips signing JWTs.

noLink
  • Type: Boolean
  • Optional
  • Defaults to false
  • Available since 1.29.0

When true and no link to a FusionAuth user exists, FusionAuth returns a 404 status code instead of applying the linking strategy. Use noLink to check for a link before you start an interactive linking workflow with the user.

Example Request JSON
{
  "applicationId": "10000000-0000-0002-0000-000000000001",
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0ODUxNDA5ODQsImlhdCI6MTQ4NTEzNzM4NCwiaXNzIjoiYWNtZS5jb20iLCJzdWIiOiIyOWFjMGMxOC0wYjRhLTQyY2YtODJmYy0wM2Q1NzAzMThhMWQiLCJhcHBsaWNhdGlvbklkIjoiNzkxMDM3MzQtOTdhYi00ZDFhLWFmMzctZTAwNmQwNWQyOTUyIiwicm9sZXMiOltdfQ.Mp0Pcwsz5VECK11Kf2ZZNF_SMKu5CgBeLN9ZOP04kZo"
  },
  "identityProviderId": "7a9ed2eb-13e7-424a-b416-c9392c7192a1",
  "ipAddress": "192.168.1.42"
}

Response#

The response contains the User object.

Response Codes
CodeDescription
200

The authentication succeeded. The response contains the authenticated User object.

202

The authentication succeeded, but the user isn't registered for the Application in the applicationId of the request.

The response contains the authenticated User object.

203

The authentication succeeded, but the user must change the password. The response contains the changePasswordId for the Change Password API.

Example Response JSON
{
  "changePasswordId": "XOgai4Ro68xfGiex0ngXiJ2bbhduM4Pm7h3lvF0xibQ",
  "changePasswordReason": "Expired"
}
204

The login waits on an action by the user. Wait, and then send the request again.

212

The identity that the user logged in with, such as an email address or phone number, isn't verified yet. The response contains the authenticated User object. When the verification strategy is FormField, the response also contains the emailVerificationId that FusionAuth generated for the user. The response can also contain an identityVerificationId.

213

The Registration of the user isn't verified yet. The response contains the authenticated User object. When the verification strategy is FormField, the response also contains the registrationVerificationId that FusionAuth generated for the user.

Before version 1.27.0, FusionAuth returned 200 instead of this status code.

232

The Identity Provider uses the CreatePendingLink linking strategy, and the user has no link. The response contains only the pendingIdPLinkId, and possibly threatsDetected. To link the user, call the Complete a Pending Link API. After FusionAuth links the user, call this API again to log in.

Example Response JSON
{
  "pendingIdPLinkId": "0TxfELqDE0d2Y6PqCkztz4o-lXdRyAscAXh8EAyRZsx"
}
242

The authentication succeeded, and the user has two-factor authentication enabled. In 1.42.0 and later, FusionAuth also returns this status code when two-factor authentication is required. The response contains the twoFactorId for the Complete Two-Factor Authentication API.

Example Response JSON
{
  "methods": [
    {
      "authenticator": {
        "algorithm": "HmacSHA1",
        "codeLength": 6,
        "timeStep": 30
      },
      "id": "2KSZ",
      "method": "authenticator"
    },
    {
      "email": "richard@fusionauth.io",
      "id": "KLRT",
      "method": "email"
    }
  ],
  "twoFactorId": "YkQY5Gsyo4RlfmDciBGRmvfj3RmatUqrbjoIZ19fmw4"
}
400

The request was invalid or malformed, or a login validation lambda rejected the login. The response contains an Errors JSON object with the specific errors.

401

FusionAuth couldn't complete the login. For example, the Identity Provider isn't enabled for the Application, FusionAuth couldn't verify the response from the Identity Provider, or FusionAuth couldn't reconcile the user.

404

FusionAuth didn't find the user, or no Link to the user exists and either the linking strategy is Disabled or the request set noLink to true. The response is empty.

409

An action on the user prevents login. The response contains the actions that prevent login.

Example Response JSON
{
  "actions": [
    {
      "actionId": "00000000-0000-0000-0000-000000000042",
      "actionerUserId": "00000000-0000-0001-0000-000000000000",
      "expiry": 1571786483322,
      "localizedName": "Prevent Login Action",
      "localizedReason": "Hard Lock",
      "name": "Prevent Login Action",
      "reason": "Hard Lock",
      "reasonCode": "hard_lock"
    }
  ]
}
410

The user has expired. The response is empty.

500

FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response is empty.

503

The search index is unavailable or returned an error, so FusionAuth can't complete the request. The response contains a JSON body.

504

One or more webhook endpoints returned an invalid response or were unreachable. Because of the transaction configuration for the event, FusionAuth can't complete the request. FusionAuth logs a stack trace in the FusionAuth log files.

When the applicationId or the identityProviderId doesn't exist, the response has a 400 status code. The response also has a 400 status code when the identityProviderId belongs to an Identity Provider of another type.

Login Failures#

FusionAuth returns a 401 for the following causes:

  • FusionAuth can't validate the JWT signature.
  • The JWT is missing a claim that the Identity Provider configuration requires. FusionAuth always requires the unique Id claim. When the linking strategy links on the email claim or the username claim, FusionAuth also requires that claim.
  • The email verified claim is false, and the linking strategy links on email.
  • The email address isn't in a domain that the Identity Provider manages.
  • The linking strategy is LinkByEmailForExistingUser, and no user has the email address.
  • The linking strategy links on email, and the user with the email address already has a link to the IdP with a different unique Id.

Response Body#

emailVerificationId
  • Type: String

An email verification Id, which is needed when performing your own email verification using the /api/user/verify-email API.

This field is only returned when the tenant.emailConfiguration.verificationStrategy is set to FormField.

identityVerificationId
  • Type: String
  • Available since 1.59.0

An identity verification Id, which is needed when performing your own identity verification using the /api/identity/verify API.

This field is only returned under the following conditions, based on the identity that was used to log in:

  • An email address - the tenant.emailConfiguration.verificationStrategy is set to FormField.
  • A phone number - the tenant.phoneConfiguration.verificationStrategy is set to FormField.
refreshToken
  • Type: String

The refresh token that can be used to obtain a new access token once the provided one has expired.

Because a refresh token is per user and per application, this value will only be returned when an applicationId was provided on the login request and the user is registered to the application.

You must explicitly allow generation of refresh tokens when using the Login API.

Configure the application.loginConfiguration.generateRefreshTokens setting via the API or enable the setting by navigating to the Application -> My Application -> Security tab.

refreshTokenId
  • Type: String
  • Available since 1.37.0

When the refreshToken is returned in the response, this field will also be returned. This unique Id is the persistent identifier for this refresh token, and will not change even when using one-time use refresh tokens. This value may optionally be used to revoke the token using the Refresh Token API.

state
  • Type: Object

If authenticated using a One Time Password and state was provided during the Change Password request this value will be returned exactly as it was provided.

threatsDetected
  • Type: Array<String>
  • Available since 1.37.0

The authentication threats FusionAuth detected for the login. FusionAuth only detects threats with Advanced Threat Detection. Currently, FusionAuth only returns ImpossibleTravel, when the impossible travel risk is high. To receive the other threats, listen for the Suspicious Login event.

token
  • Type: String
  • Available since 1.16.0

The access token, this string is an encoded JSON Web Token (JWT).

When the user will be sent a setup password email or sms message, this token will not be returned.

tokenExpirationInstant
  • Type: Long
  • Available since 1.33.0

The instant the token will expire. If the response does not contain a token, this field will also be omitted from the response.

user.active
  • Type: Boolean

True if the User is active. False if the User has been deactivated. Deactivated Users will not be able to log in.

user.birthDate
  • Type: String

The User's birthdate formatted as YYYY-MM-DD

user.breachedPasswordLastCheckedInstant
  • Type: Long

The instant this user's password was last checked to determine if it is compromised.

user.connectorId
  • Type: UUID
  • Available since 1.18.0

The unique Id of the Connector associated with the System of Record being used to authenticate the user.

user.cleanSpeakId
  • Type: UUID

This Id is used by FusionAuth when the User's username is sent to CleanSpeak to be moderated (filtered and potentially sent to the approval queue). It is the content Id of the username inside CleanSpeak.

user.data
  • Type: Object

An object that can hold any information about the User that should be persisted.

user.data.email
  • Type: String

This field will be used as the email address if no user.email field is found.

This feature was removed in version 1.26.0 and added back in 1.27.2.

user.email
  • Type: String

The User's email address.

user.expiry
  • Type: Long

The expiration instant of the User's account. An expired user is not permitted to log in.

user.firstName
  • Type: String

The first name of the User.

user.fullName
  • Type: String

The User's full name as a separate field that is not calculated from firstName and lastName.

user.id
  • Type: UUID

The User's unique Id.

user.identities
  • Type: Array
  • Available since 1.59.0

The list of identities that exist for a User.

user.identities[x].displayValue
  • Type: String
  • Available since 1.59.0

The display value for the identity. Only used for username type identities. If the unique username feature is not enabled, this value will be the same as user.identities[x].value. Otherwise, it will be the username the User has chosen. For primary username identities, this will be the same value as user.username.

user.identities[x].insertInstant
  • Type: Long
  • Available since 1.59.0

The instant when the identity was created.

user.identities[x].lastLoginInstant
  • Type: Long
  • Available since 1.59.0

The instant when the identity was last used to log in. If a User has multiple identity types (username, email, and phoneNumber), then this value will represent the specific identity they last used to log in. This contrasts with user.lastLoginInstant, which represents the last time any of the User's identities was used to log in.

Note

Identity provider logins will not be reflected here (see user.lastLoginInstant for a field that includes identity provider logins).

user.identities[x].lastUpdateInstant
  • Type: Long
  • Available since 1.59.0

The instant when the identity was last updated.

user.identities[x].moderationStatus
  • Type: String
  • Available since 1.59.0

The current status of the username. This is used if you are moderating usernames via CleanSpeak. The possible values are:

  • ACTIVE - the username is active
  • PENDING - the username is pending approval/moderation
  • REJECTED - the username was rejected during moderation

If a username has been rejected, it is still possible to allow the User to update it and have the new one moderated again.

Only used for username type identities. For primary username identities, this will be the same value as user.usernameStatus.

user.identities[x].type
  • Type: String
  • Available since 1.59.0

The identity type. The possible values are:

  • email - identities defined by an email address
  • phoneNumber - identities defined by a phone number
  • username - identities defined by a username
user.identities[x].value
  • Type: String
  • Available since 1.59.0

The value represented by the identity. The contents of this field depend on user.identities[x].typeand will be one of the following:

  • Email address - The User's email address, always lower cased. For primary email identities, this will be the same value as user.email
  • Phone number - The User's phone number, in E.164 canonical format. For primary phone number identities, this will be the same value as user.phoneNumber
  • Username - User's username - this will be the same as user.identities[x].displayValue. For primary username identities, this will be the same value as user.username

This value is unique within a tenant for a particular user.identities[x].type.

Note

If the unique usernames feature is enabled, value will be the unique username (within the tenant). For primary username identities, this will also be the same value as user.uniqueUsername.

user.identities[x].verified
  • Type: Boolean
  • Available since 1.59.0

Whether verification was actually performed on the identity by FusionAuth. This is used in combination with the user.identities[x].verifiedReason to decide whether an identity needs verification.

user.identities[x].verifiedInstant
  • Type: Long
  • Available since 1.59.0

The instant when verification was performed on the identity. This field is only populated when verification was actually performed on the identity by FusionAuth.

user.identities[x].verifiedReason
  • Type: String
  • Available since 1.59.0

The reason the User's identity was verified or not verified. The possible values are:

  • Skipped - Verification was skipped due to the skipVerification parameter on the request
  • Trusted - Identity was created via an identity provider or a connector
  • Unverifiable - FusionAuth doesn't know how to verify this identity type. Usernames are an example
  • Implicit - Verification was implicitly performed when the user completed another workflow that FusionAuth sent to the identity, such as set password, forgot password, or passwordless login
  • Pending - Tenant policy requires verification but no verification has been performed yet
  • Completed - Verification was performed by FusionAuth
  • Disabled - Tenant policy did not require verification
  • Import - User was imported so verification was not performed by FusionAuth

If this field is Disabled, Import, Skipped, Trusted, or Unverifiable, then verification will not be required, regardless of the user.identities[x].verified value. For Implicit, Pending, or Completed, the identity will require verification if user.identities[x].verified is false.

user.imageUrl
  • Type: String

The URL that points to an image file that is the User's profile image.

user.insertInstant
  • Type: Long

The instant when the user was created.

user.lastLoginInstant
  • Type: Long

The instant when the User logged in last. See user.identities[x].lastLoginInstant for more granular information based on identity.

user.lastName
  • Type: String

The User's last name.

user.lastUpdateInstant
  • Type: Long

The instant when the User was last updated.

user.legacyIdentifier
  • Type: String
  • Available since 1.67

Used to override the sub claim in tokens issued by the Legacy Identity Provider Adapter.

This value is immutable after the user is created and is unique within the tenant when non-null.

user.memberships
  • Type: Array

The list of memberships for the User.

user.memberships[x].data
  • Type: Object

An object that can hold any information about the User for this membership that should be persisted.

user.memberships[x].groupId
  • Type: UUID

The Id of the Group of this membership.

user.memberships[x].id
  • Type: UUID

The unique Id of this membership.

user.memberships[x].insertInstant
  • Type: Long

The instant that the membership was created.

user.middleName
  • Type: String

The User's middle name.

user.mobilePhone
  • Type: String

The User's mobile phone number. This is useful if you will be sending push notifications or SMS messages to the User.

Note

This differs from user.phoneNumber and cannot be used to log in.

user.parentEmail
  • Type: String
  • Available since 1.7.0

The email address of the user's parent or guardian. If this value was provided during a create or update operation, this value will only remain until the child is claimed by a parent.

user.passwordChangeRequired
  • Type: Boolean

Indicates that the User's password needs to be changed during their next login attempt.

user.passwordLastUpdateInstant
  • Type: Long

The instant that the User last changed their password.

Note

Since version 1.59.0, if a user does not currently have a password, this field will not be returned in the response.

user.phoneNumber
  • Type: String
  • Available since 1.59.0

The User's primary phone number. The phone number is stored and returned in E.164 canonical format, however a phone number is considered unique regardless of the format. 303-555-1212 is considered equal to +13035551212 so either version of this phone number can be used whenever providing it as input to an API.

Note

This differs from user.mobilePhone in that user.phoneNumber can be used to log in, in the same way as an email address or a username.

user.preferredLanguages
  • Type: Array<String>

An array of locale strings that give, in order, the User's preferred languages. These are important for email templates and other localizable text. See Locales.

user.registrations
  • Type: Array

The list of registrations for the User. This will include registrations for inactive applications.

user.registrations[x].applicationId
  • Type: UUID

The Id of the Application that this registration is for.

user.registrations[x].authenticationToken
  • Type: String

The Authentication Token for this registration (if one exists).

user.registrations[x].cleanSpeakId
  • Type: UUID

This Id is used by FusionAuth when the User's username for this registration is sent to CleanSpeak to be moderated (filtered and potentially sent to the approval queue). It is the content Id of the username inside CleanSpeak.

user.registrations[x].data
  • Type: Object

An object that can hold any information about the User for this registration that should be persisted.

user.registrations[x].id
  • Type: UUID

The Id of this registration.

user.registrations[x].insertInstant
  • Type: Long

The instant that this registration was created.

user.registrations[x].lastLoginInstant
  • Type: Long

The instant that the User last logged into the Application for this registration.

user.registrations[x].preferredLanguages
  • Type: Array<String>

An array of locale strings that give, in order, the User's preferred languages for this registration. These are important for email templates and other localizable text.

user.registrations[x].roles
  • Type: Array<String>

The list of roles that the User has for this registration. The string is the role's Name not the role's Id, e.g. admin or user-role.

user.registrations[x].timezone
  • Type: String

The User's preferred timezone for this registration. The string will be in an IANA time zone format.

user.registrations[x].tokens
  • Type: Map<String,String
  • Deprecated

A map that contains tokens returned from identity providers.

For example, if this user has authenticated using the Facebook Identity Provider, the Facebook access token will be available in this map, keyed by name Facebook. For an OpenID Connect Identity provider, or other generic providers, if a token is stored it will be keyed by the Identity Provider unique Id.

Removed in 1.28.0

The token returned and stored from the Identity Provider is now stored in the IdP link and is retrievable using the Identity Provider Link API.

user.registrations[x].username
  • Type: String

The username of the User for this registration only. This is for display purposes and cannot be used to log in.

user.registrations[x].usernameStatus
  • Type: String

The current status of the username. This is used if you are moderating usernames via CleanSpeak. The possible values are:

  • ACTIVE - the username is active
  • PENDING - the username is pending approval/moderation
  • REJECTED - the username was rejected during moderation

If a username has been rejected, it is still possible to allow the User to update it and have the new one moderated again.

user.registrations[x].verified
  • Type: Boolean

Whether the User has verified this registration. When the Application has application.verifyRegistration set to true, a new registration starts as false and changes to true after the User completes registration verification. Otherwise, a new registration starts as true.

Registration verification is separate from email verification. user.verified reports email verification. Verifying a registration also verifies the User's primary email address when FusionAuth sent the registration verification email and the Tenant has tenant.emailConfiguration.implicitEmailVerificationAllowed set to true.

For additional information, see these tutorials:

user.registrations[x].verifiedInstant
  • Type: Long
  • Available since 1.48.0

The instant that this registration was verified.

user.tenantId
  • Type: UUID

The Id of the Tenant that this User belongs to.

user.timezone
  • Type: String

The User's preferred timezone. This can be used as a default to display instants, and it is recommended that you allow Users to change this per-session. The string will be in an IANA time zone format.

user.twoFactor.methods[x].authenticator.algorithm
  • Type: String

The algorithm used by the TOTP authenticator. With the current implementation, this will always be HmacSHA1.

user.twoFactor.methods[x].authenticator.codeLength
  • Type: Integer

The length of code generated by the TOTP. With the current implementation, this will always be 6.

user.twoFactor.methods[x].authenticator.timeStep
  • Type: Integer

The time-step size in seconds. With the current implementation, this will always be 30.

user.twoFactor.methods[x].email
  • Type: String

The value of the email address for this method. Only present if user.twoFactor.methods[x].method is email.

user.twoFactor.methods[x].id
  • Type: String

The unique Id of the method.

user.twoFactor.methods[x].lastUsed
  • Type: Boolean

true if this method was used most recently.

user.twoFactor.methods[x].method
  • Type: String

The type of this method. There will also be an object with the same value containing additional information about this method. The possible values are:

  • authenticator
  • email
  • sms
user.twoFactor.methods[x].mobilePhone
  • Type: String

The value of the mobile phone for this method. Only present if user.twoFactor.methods[x].method is sms.

user.twoFactorDelivery
  • Type: String
  • Deprecated

The User's preferred delivery for verification codes during a two-factor login request.

The possible values are:

  • None
  • TextMessage
Removed in 1.26.0
user.twoFactorEnabled
  • Type: Boolean
  • Deprecated

Determines if the User has two-factor authentication enabled for their account or not.

Removed in 1.26.0
user.username
  • Type: String

The username of the User.

user.usernameStatus
  • Type: String

The current status of the username. This is used if you are moderating usernames via CleanSpeak. The possible values are:

  • ACTIVE - the username is active
  • PENDING - the username is pending approval/moderation
  • REJECTED - the username was rejected during moderation

If a username has been rejected, it is still possible to allow the User to update it and have the new one moderated again.

user.verified
  • Type: Boolean
  • Deprecated

Whether the User's primary email address is verified or exempt from verification. When the User has no email address, this field reports the username instead. Phone numbers never affect this field. To check the verification status of a phone number, use user.identities[x].verified and user.identities[x].verifiedReason.

For additional information, see these tutorials:

Deprecated since 1.59.0

See user.identities[x].verified and user.identities[x].verifiedReason.

user.verifiedInstant
  • Type: Long
  • Available since 1.48.0

The first instant that the User's primary email address or phone number was verified. This value is immutable and cannot change for a user once set.

Example Response JSON
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0ODUxNDA5ODQsImlhdCI6MTQ4NTEzNzM4NCwiaXNzIjoiYWNtZS5jb20iLCJzdWIiOiIyOWFjMGMxOC0wYjRhLTQyY2YtODJmYy0wM2Q1NzAzMThhMWQiLCJhcHBsaWNhdGlvbklkIjoiNzkxMDM3MzQtOTdhYi00ZDFhLWFmMzctZTAwNmQwNWQyOTUyIiwicm9sZXMiOltdfQ.Mp0Pcwsz5VECK11Kf2ZZNF_SMKu5CgBeLN9ZOP04kZo",
  "user": {
    "active": true,
    "birthDate": "1976-05-30",
    "breachedPasswordLastCheckedInstant": 1471786483322,
    "breachedPasswordStatus": "None",
    "connectorId": "e3306678-a53a-4964-9040-1c96f36dda72",
    "data": {
      "displayName": "Johnny Boy",
      "favoriteColors": [
        "Red",
        "Blue"
      ]
    },
    "email": "example@fusionauth.io",
    "expiry": 1571786483322,
    "firstName": "John",
    "fullName": "John Doe",
    "id": "00000000-0000-0001-0000-000000000000",
    "identities": [
      {
        "insertInstant": 1742936980069,
        "lastLoginInstant": 1742936980069,
        "lastUpdateInstant": 1742936980069,
        "primary": true,
        "type": "email",
        "value": "example@fusionauth.io",
        "verified": false,
        "verifiedReason": "Disabled"
      },
      {
        "insertInstant": 1742936980069,
        "lastLoginInstant": 1742936980069,
        "lastUpdateInstant": 1742936980069,
        "primary": true,
        "type": "phoneNumber",
        "value": "+13035551212",
        "verified": false,
        "verifiedReason": "Disabled"
      },
      {
        "displayValue": "johnny123",
        "insertInstant": 1742936980069,
        "lastLoginInstant": 1742936980069,
        "lastUpdateInstant": 1742936980069,
        "moderationStatus": "ACTIVE",
        "primary": true,
        "type": "username",
        "value": "johnny123",
        "verified": false,
        "verifiedReason": "Unverifiable"
      }
    ],
    "imageUrl": "http://65.media.tumblr.com/tumblr_l7dbl0MHbU1qz50x3o1_500.png",
    "insertInstant": 1742936980069,
    "lastLoginInstant": 1742936980069,
    "lastName": "Doe",
    "middleName": "William",
    "mobilePhone": "303-555-1234",
    "passwordChangeRequired": false,
    "passwordLastUpdateInstant": 1742936980069,
    "phoneNumber": "+13035551212",
    "preferredLanguages": [
      "en",
      "fr"
    ],
    "registrations": [
      {
        "applicationId": "10000000-0000-0002-0000-000000000001",
        "data": {
          "displayName": "Johnny",
          "favoriteSports": [
            "Football",
            "Basketball"
          ]
        },
        "id": "00000000-0000-0002-0000-000000000000",
        "insertInstant": 1742936980069,
        "lastLoginInstant": 1742936980069,
        "preferredLanguages": [
          "en",
          "fr"
        ],
        "roles": [
          "user",
          "community_helper"
        ],
        "username": "johnny123",
        "usernameStatus": "ACTIVE",
        "verified": true,
        "verifiedInstant": 1742936980069
      }
    ],
    "timezone": "America/Denver",
    "tenantId": "f24aca2b-ce4a-4dad-951a-c9d690e71415",
    "twoFactor": {
      "methods": [
        {
          "authenticator": {
            "algorithm": "HmacSHA1",
            "codeLength": 6,
            "timeStep": 30
          },
          "id": "35VW",
          "method": "authenticator"
        },
        {
          "id": "V7SH",
          "method": "sms",
          "mobilePhone": "555-555-5555"
        },
        {
          "email": "example@fusionauth.io",
          "id": "7K2G",
          "method": "email"
        }
      ]
    },
    "usernameStatus": "ACTIVE",
    "username": "johnny123",
    "verified": true,
    "verifiedInstant": 1742936980069
  }
}

Response Cookies#

access_token
  • Type: String

The access token, an encoded JSON Web Token (JWT). FusionAuth writes the access token as an HTTP-only session cookie.

refresh_token
  • Type: String

The refresh token. FusionAuth writes the refresh token as an HTTP-only persistent cookie. The cookie lasts as long as the refresh token time to live in the JWT configuration of the Tenant. When the Application enables its own JWT configuration, the time to live of the Application applies instead.