User Manual

Generate Authenticator App URI Action for 2FA Integration

7/10/26
Generate Authenticator App URI Action for 2FA Integration

You can enhance your app’s security by using two-factor authentication (2FA) in Kuika. With 2FA, a user’s account remains protected even if their password is compromised. This provides an important layer of security, especially for apps that handle financial or personal data.

The Generate Authenticator App URI action creates a user-specific URI (Uniform Resource Identifier) that allows users to set up their accounts in mobile authentication apps such as Google Authenticator or Microsoft Authenticator. This URI can be displayed as a QR code or entered manually into the app.

In this guide, you’ll learn step-by-step how to enable 2FA through the Kuika Config Manager module, how to use the “Generate Authenticator App URI” action, how to configure the sending of verification codes via SMS or email, and how to integrate 2FA into the login flow.

How to Enable 2FA?

1. Open or Create a Configuration

  • Log in to the Kuika platform.
  • From the Apps screen, open the project you’ll be working on.
  • Click the Config Manager module in the top menu.
  • To create a new configuration, click the Create a blank configuration card, give the configuration a name, and complete the creation process. If you want to use an existing configuration, click its name in the list.

2. Go to the Authentication & Authorization Settings

  • Make sure the App Settings tab is selected at the top of the configuration screen.
  • In the left menu, click the Authentication & Authorization option under the Identity & Access heading. You can also quickly access this setting by typing “authentication” into the Search settings field at the top of the menu.

3. Configure 2FA Settings

  • Enable the 2F Auth toggle. Once enabled, the 2 Auth Duration field will appear.
  • Enter the duration for two-factor authentication in days in the 2 Auth Duration field (e.g., 15).

4. Save the Settings

  • Make sure you’ve filled out all required fields completely and correctly.
  • Click the SAVE button in the top-right corner to save your changes.

Authentication with the Authenticator App

1. Add the “Generate Authenticator App URI” Action

  • Add a button to the screen where the user will start the 2FA setup (e.g., “Start 2FA”).
  • Add an OnClick trigger to the button.
  • Select Authorization > Generate Authenticator App URI as the action.

When the action runs, a unique URI is generated for the user. You can display this URI as a QR code or provide it as text so the user can manually enter it into their authentication app.

2. Display the QR Code

  • Display the URI returned by the action using a QR code component.
  • The user scans the QR code with their mobile authentication app to link their account to the app.

Sending a Verification Code via SMS or Email

1. Edit the Email Template

  • Customize the content of the verification code email by editing the Verify Email template in the Email Builder module.

2. Create a Verification Code Sender for SMS

  • Click the + icon in the Datasources module.
  • Select the C# data source.
  • Select the Custom Verification Code Sender Provider template.
  • Create the message content using information such as User Email, User Phone, FirstName, and LastName.
  • Define the sending process above the `return false` line in the code, according to the necessary conditions.

Using 2FA During Login

1. Configure User Login

  • Add the Authorization > Encrypted Sign In action to the Login button. This action performs username and password validation.
  • Assign values to the User Name and Password parameters using Current (e.g., Current.Email, Current.Password).

2. Complete the Verification Code Step

  • After the username and password are verified, the user is redirected to the Verification Code screen for the second verification step.
  • Once the user enters the verification code, access to the application is granted.

Once you’ve completed these steps, you’ll have set up a secure login flow protected by two-factor authentication in your app.

Important Tips

  • Users’ private keys are securely stored within the system by Kuika.
  • Each user can only register with the verification app using a QR code specific to their own account. Make sure the QR code is displayed only to the relevant user.
  • Before deploying to production, test the 2FA flow end-to-end in a test environment with different authentication apps and users.

By configuring 2FA correctly, you can protect your users’ accounts with an additional layer of security against unauthorized access.

No items found.

Glossary

No items found.

Alt Başlıklar