Skip to main content
The phone number and the email address reach the application in the phone_number and email claims. There are two modes for getting them:
  • At the first sign-in. Veriqa collects the phone number or email inside the same sign-in, before it issues the tokens. Whether the claim is needed and whether the user may skip it is set by its level in the Veriqa:ScopesClaims catalog — see Collecting extra claims.
  • Later, when needed. The user signs in without any contact details. When the phone number or email is needed, the application starts a new authorize request with scope=phone or scope=email, and the user confirms it in the messaging app.
The Helio showcase sample shows the second mode: the sign-in asks for no contact details, and the customer confirms the phone number and email later, each with a request of its own.

At the first sign-in

Sign-in with extra details: after confirming in Telegram, the user shares a phone number, fills in the missing fields of a short form, confirms the email with one ready-made message, and the app receives the verified claims.

Inside the sign-in, the user shares the phone number with one tap and confirms the email with a ready-made message.

Phone number

Most messaging apps know the phone number the user signed up with. So you can get the phone number without SMS: it either comes from the channel on its own, or the user shares it with one tap in the chat when Veriqa asks for it. Telegram, WhatsApp and some other channels give a verified number (phone_number_verified: true). You turn the request on by setting the phone_number claim to Required or Optional in the Veriqa:ScopesClaims catalog, in the client record’s ClaimLevels or in the claims parameter of the request; it applies under the phone scope. How this works in each channel, and whether ownership of the number is proven, is covered in Phone number.

Email

Veriqa collects the address by an email that confirms it or by an email the user sends. The available methods are set by ClaimCompletionEmailMethods of the client entry. The user sees at most three options, in the order of the list: the first one is shown, and the others appear as links under OR.
  • Code by email — the user types the address and presses Send code. What arrives is decided by the list, not by the user: a code to enter on the page (Code), a link to a confirmation page (MagicLink), or one email with both (claim-code-link-mail) when the list names both — whichever the user does first confirms the address. When the list names only MagicLink, the option is Link by email and the button is Send link. email_verified is true;
  • Email from my mailbox (Push) — the user sends a prepared email, on the device that confirmed the sign-in; email_verified is true;
  • Enter email without verification (Unverified) — the address is only typed, and a gray alert icon in the address field says “Email not confirmed.” when hovered or tapped; there is no button of its own, “Continue” saves the address. email_verified is false.
The button that sends the email is always shown and stays inactive until an address is typed. A value typed into the other fields of the form survives every step of the email flow — requesting the email, entering the code, switching the method — and a reload of the page, until the user continues or cancels the sign-in; the address typed into the block goes over to the method the user switches to. Reloading the page after an action of the email block repeats nothing: no email goes out again, and no code attempt is spent. The main button is always there, next to “Cancel sign-in” below the block; the form offers “Cancel sign-in” on either device, whatever its fields. While the email is not yet recorded, the main button is “Continue”:
  • with nothing typed into the email block, it saves the fields: an optional email is skipped, and for a required one the page says “Confirm the address to continue.”;
  • with a code typed, it checks the code; with an address typed for Enter email without verification, it saves the address;
  • with an address typed for any other option, it sends and saves nothing: the other fields stay as typed, and the block says “Confirm your email address or clear the field.”
Once the email is recorded and only the other fields are left, the same button is Finish sign-in, or Confirm for a server-to-server confirmation. Only the name changes: the button saves the fields and closes the form. Another email cannot be requested sooner than Veriqa:Channels:Email:MailResendInterval after the previous one — see Sending an email again. What the email block shows as the user proceeds:
  • After the email is sent, the code field and the Send again link. “Send again” sends nothing by itself: it brings back the address field, filled with the address of the last email, so the user either sends the same email once more or corrects the address first.
  • A code whose attempts are spent turns the block back to that address field while emails are left within the limits; when none are left, the block says “The code has no attempts left.” and asks for nothing more. When the per-address limit is reached, the block says “Too many emails have been sent to this address. Try again later or enter another address.”
  • An address confirmed elsewhere — by the link in the email (opened on a phone, say) or by the email the user sends — is picked up by the form on its own: the form continues as if Check status were pressed, keeping what the user typed into the other fields. While a sent link is still valid, the form waits for it on every step of the block, including the address field brought back by “Send again”. When the user comes back to the page — from the mail app, say — the form checks once more whether the address is already confirmed. The button is shown only when the page cannot learn of the confirmation itself, for example when its connection to the server is lost.
  • A recorded address stays in the block while other fields of the form are still open, in a read-only field: a check mark says “Email confirmed.”, and a gray alert icon “Email not confirmed.” for an address taken without verification. The Change link under the field brings back the address field with the recorded address in it, and the values of the other fields stay. A changed address has to be confirmed again, even one that was confirmed before, and emails already sent still count toward the limits. The link is shown only while at least one method can still obtain the address. Without the Email adapter, the form shows no Change link, and an address is final once it is saved.
The page the link in the email opens offers Cancel beside “Confirm the address”, and Close once the address is confirmed; both only close the tab.

Later, when needed

The first sign-in takes the minimum: sub plus whatever the channel gives. Before the action that needs a contact, the application starts a new authorize request with scope=phone or scope=email. The user confirms it in the messaging app, and the claim arrives in the id_token. The sample page describes how Helio does it; the general scheme is in Collecting extra claims.

Why the data is verified

The difference from a form is who the source of the value is. An address typed into a form is the user’s word; an address that arrives as a claim from the Email channel follows from the person having confirmed a sign-in from that very mailbox. There is nothing left to verify with a separate email. The same holds for what Veriqa collects: a number shared in the channel and an address confirmed by a code come with phone_number_verified / email_verified, while a form field is what the user typed.