Historically, registering with an XMPP service has been difficult. Each server either used customized out-of-band registration mechanisms such as web forms which were difficult to discover, or they used In-Band Registration (XEP-0077)  which could easily be abused by spammers to register large numbers of accounts and which allowed for only limited extensibility.
To solve these issues this specification provides a new in-band registration protocol that allows servers to present the user with a series of "challenges". This allows for both multi-stage proof-of-possession registration flows and spam prevention mechanisms such as proof-of-work functions.
Clients, servers, and other services such as components that support Extensible IBR MUST advertise the fact by including a feature of "urn::xmpp:register:0" in response to Service Discovery (XEP-0030)  information requests and in their Entity Capabilities (XEP-0115)  profiles.
Registration or recovery is completed after responding to a series of challenges issued by the server. Challenges are grouped in to "flows", a number of challenges that may be issued together to complete an action. For example, a registration flow might be created that issues a data form challenge which will be shown to the user to gather information, then issues a second data form challenge to let the user enter a confirmation code that was sent to their email.
If a server supports registering for or recovering an account using Extensible IBR during stream negotiation, it MUST inform the connecting client when returning stream features during the stream negotiation process. This is done by including a <register/> element, qualified by the 'urn:xmpp:register:0' namespace for account registration, or a <recovery/> element qualified by the same namespace for account recovery. The register and recovery features are always voluntary-to-negotiate. The registration and recovery features MUST NOT be advertised before a security layer has been negotiated, eg. using direct TLS or opportunistic TLS. They SHOULD be advertised at the same time as the SASL authentication feature, meaning that after registration or recovery is completed SASL authentication can proceed.
For recovery or registration, the server MUST include a list of all challenges which the client may receive during the course of registering or recovering an account. These are grouped into "flows" and let the client pick a registration workflow that only contains challenges which the client supports. Each <flow/> element MUST have a unique "id" attribute which is used by the client to identify the flow being selected. The id attribute is only used during this particular flow negotiation and has no meaning after a flow has been selected. Flows must also have at least one <name/> element containing a short, human readable description of the flow. If multiple <name/> elements are present they MUST have unique values for the "xml:lang" attribute. Clients MAY use the name element to show the different flows to the user and ask them to pick between them. Each flow element must also contain an unordered set of <challenge/> elements representing the various challenge types that may be required to complete the registration or recovery flow. Each <challenge/> element contains a "type" attribute that uniquely identifies the challenge for the purpose of determining if it is supported. If a flow would offer the same challenge twice (eg. two data forms asking for different data), the challenge SHOULD only be listed once in the flow element.
For example, a server may advertise a "Verify with SMS" flow and a "Verify by Phone Call" flow that both show a data form asking for a phone number and then a second data form asking for a token provided to the user in a text message or phone call depending on which flow the user selects.
Just because a challenge type is listed by the server in the initial flow element does not mean that it will be issued by the server. Servers MAY choose to issue more or fewer challenges based on the result of previous challenges and may not use every challenge type listed in the original flow.
Registration or recovery may also be completed after stream neogtiation if server policy allows it.
To find what flows an entity provides (if any) after stream negotiation is complete the requester can send an IQ of type "get" containing a <register> or <recovery> element qualified by the "urn:xmpp:register:0" namespace.
When responding to a query for registration or recovery flows the list of challenges MUST be included just as it would be during stream feature negotiation. That is, a "register" or "recovery" element containing a list of flows, each with an id, containing a name and a list of challenges.
If an entity supports issuing challenges but does not provide any flows after stream negotiation is complete it MUST respond with an empty list. Similarly, an entity that supports this specification but does not support issuign challenges itself (for example, a client that only supports receiving challenges) it MUST respond successfully with an empty list.
A client selects the registration or recovery feature for negotiation by replying with an element of the same name and namespace. The element MUST contain a <flow> element that MUST have an "id" attribute matching one of the flows advertised by the server. For example, to select the "Verify by Phone Call" registration flow from the previous example, the client would reply with:
If the client is initiating registration or recovery after a stream has already been initiated it uses the same registration element wrapped in an IQ of type "set".
The server then replies to the IQ or feature selection with a challenge. If replying to an IQ, the challenge must be wrapped in an IQ of type "result". Challenges take the form of a <challenge/> element qualified by the 'urn:xmpp:register:0' namespace with a 'type' attribute that uniquely identifies the type of payload a client might expect the element to contain.
After a challenge is received, the client replies to the challenge by sending a <response/> element qualified by the 'urn:xmpp:register:0' namespace or a cancellation as defined later in this document. If the client sends a response, it MUST also include the payload corresponding to the challenges 'type' element (which may be empty).
After a response is received, if the server needs more information it MAY issue another challenge. For example, if the user has entered their email in response to a challenge, the server might send an email and then issue another challenge asking for the unique code sent in the email.
If after receiving a challenge or response a client or server does not wish to continue registration or recovery, it may send an empty <cancel/> element qualified by the 'urn:xmpp:register:0' namespace. This informs the client or server that registration is complete. This is the same as submitting a data form of type 'cancel' in response to a data form challenge.
If the IQ based registration or recovery flow is being used and the server wishes to cancel the flow, it MAY respond to any IQ with the cancel element and type "result".
A server may also issue a cancelation IQ with type 'set' if it wishes to cancel after a request/response has been received (ie. when there is no existing IQ to respond to).
If the client successfully completes all required challenges during stream negotiation the server MUST return a <success/> element qualified by the 'urn:xmpp:register:0' namespace, at which point it may continue with the stream negotiation process. The success element MUST contain a <jid> element containing the bare JID as registered or recovered by the server and a <username> element containing the simple user name for use with SASL (normally this will be the same as the localpart of the JID).
If the IQ based flow is being used and the server wishes to indicate success after a challenge has been completed it sends an IQ of type "set" containing the <success/> element.
This document defines several challenges that use existing technologies.
The response to a "jabber:x:data" challenge MUST be a form submission (an 'x' element of type 'submit'). For instance, to reply to the data form challenge from the previous example a client might send:
If the client sends a response to the OOB challenge it MUST be empty.
Servers can support changing passwords by providing a reset flow containing a SASL challenge. The SASL challenge re-uses the SASL profile from RFC 6120 . The server begins by sending the mechanisms list, and the client responds by selecting a mechanism and possibly including initial data. Each step in the SASL process is issued as a new SASL challenge.
When providing instructions in a data form, or in the name element of a registration or recovery flow, the server SHOULD use the language specified in the XML stream's current xml:lang, or the closest language for which the server has a translation (eg. based on mutual intelligibility between scripts and languages).
For more information about language tags and matching, see BCP 47 .
Servers that allow in-band registration need to take measures to prevent abuse. Common techniques to prevent spam registrations include displaying CAPTCHAs or requiring proof-of-possession of a valid email address or telephone number by sending a unique code (e.g. an HMAC that can later be verified as having originated at the server) to the users email and requiring that they enter the code before continuing. Servers that do not take such measures risk being black listed by other servers in the network.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) .
This specification defines the following XML namespace:
Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar  shall add the foregoing namespace to the registries located at <https://xmpp.org/registrar/stream-features.html>, and <https://xmpp.org/registrar/disco-features.html> as described in Section 4 of XMPP Registrar Function (XEP-0053) .
The XMPP Registrar  shall also add the foregoing namespace to the Jabber/XMPP Protocol Namespaces Registry located at <https://xmpp.org/registrar/namespaces.html>. Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar  shall remove the provisional status from this registry entry.
The XMPP Registrar shall maintain a registry of IBR challenges. Challenges defined within the XEP series MUST be registered with the XMPP Registrar.
In order to submit new values to this registry, the registrant shall define an XML fragment of the following form and either include it in the relevant XMPP Extension Protocol or send it to the email address <firstname.lastname@example.org>:
For an example registration, see the next section.
This specification defines the following IBR challenge:
Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar  shall add the following definitions to the IBR challenges registry, as described in this document:
If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of XEP-0053.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <email@example.com> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <firstname.lastname@example.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
8. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
9. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/