Site Search

Okta

Octa

Progressive Profiling using Auth0 Actions

Introduction

Progressive Profiling is a method of collecting user information in stages, such as on the member registration screen.
By requiring information input in stages and reducing the burden on users to respond, we can expect to improve response rates and collect more user information. It is also expected to prevent users from discontinuing registration due to problems such as difficulty in answering the questions, and improve the user withdrawal rate.

Example) Presentation of a step-by-step user information input form depending on the number of logins

ログイン回数に応じた段階的なユーザ情報入力フォームの提示

Auth0 makes it easy to implement Progressive Profiling by using the Actions or Forms features. You can flexibly respond by presenting or not presenting an input form depending on the number of times a user logs in, changing the form content, etc.

This page describes how to use the Actions function to display an input form according to the number of logins, and provides an example of how it works. Note that Glitch is used to display the input form.

premise

The information regarding functions and settings described on this page is current as of September 2023.

Setting overview

  • Auth0 Preparation
    • User created
    • Create an application with Auth0
  • Glitch settings
    • Application creation
    • Obtain information for connecting to an Auth0 application (used in Auth0 settings)
    • Registering information for Auth0 application
  • Auth0 settings
    • Action creation 1: For first login
      ・Redirect to form for first login after login operation
      ・Save form input information (user information: user_metadata, response status: app_metadata)
    • Action creation 2: For the third login
      ・Redirect to form for third login after login operation
      ・Save form input information (user information: user_metadata, response status: app_metadata)

Setting Example

Auth0 Preparation

  • User created

Create a user on Auth0 to check login operation.

  • Create an application with Auth0

Prepare an application that authenticates via Auth0. For the settings required to use the sample application and link with Okta CIC, see How to link Auth0 with the sample application.

Glitch settings

  • Application creation
  • Access the form display application template prepared by Glitch in a secret window. *Uses an application created by Okta.
    https://glitch.com/edit/#!/okta-cic-redirect-actions
  • Click [Remix] at the top right of the screen
  • Confirm that the project name in the upper left has been changed.
  • Obtain information for connecting to an Auth0 application (used in Auth0 settings)
  • Click [TERMINAL] at the bottom of the page
  • Run the following command to generate a random string to use as APP_SECRET_KEY (used in Auth0 settings)
    > openssl rand -hex 32
  • Click [Share]
  • Copy the URL in the [Live site] field (to be used in Auth0 settings)
  • Registering information for Auth0 application
  • Click [.env]
  • Enter your Auth0 tenant and application settings.
  • AUTH0_DOMAIN: The domain name of your Auth0 tenant.
  • AUTH0_CLIENT_ID: The Client ID value from your Auth0 application settings.
  • AUTH0_CLIENT_SECRET: The Client Secret value from your Auth0 application settings.
  • APP_SECRET_KEY: Random string generated in the previous step

Auth0 settings

  • Action creation 1: For first login
  • On the Auth0 management screen, click [Actions] > [Library]
  • Click [Create Action] > [Build from scratch].
  • Select the name of the action to be created, the trigger of the action, and the execution environment, and click [Create].
  • Added Secrets settings
  • Key: SESSION_TOKEN_SECRET
    Value: APP_SECRET_KEY value generated in Glitch settings
  • Key: FORM_URL
    Value: Glitch link copied in Glitch settings Example) https://Glitch project name/prog/universal
  • Click Deploy
  • Confirm that the created Action was successfully deployed
  • Click [Actions] > [Triggers].
  • Select [post-login] as the Trigger to incorporate the created Action.
  • Drag and drop the Action you created into the Trigger.
  • Click [Apply]
  • Confirm that it was reflected normally
  • Action creation 2: For the third login
  • Create a new action in the same way as steps ① to ④ of “Action creation 1”
  • Click [Deploy] and confirm that the created Action was successfully deployed.
  • Similar to steps ⑧ to ⑫ of "Action Creation 1", incorporate the created Action into the Trigger and confirm that it is reflected correctly.

Operation example

Behavior confirmation when logging in for the first time

  • Confirm that the operations when logging in are as follows.
  • After login authentication, you will be redirected to the form for first login.
  • Fill out the form and click [Register]
  • Transition to target app screen
  • Confirm user registration information
  • In the Auth0 admin page, go to User Management > Users > Select the logged-in user.
  • Confirm that form input information has been added to user_metadata and app_metadata.

Behavior confirmation when logging in for the third time

  • Confirm that the operations when logging in are as follows.
  • After login authentication, you will be redirected to the form for first login.
  • Fill out the form and click [Register]
  • Transition to target app screen
  • Confirm user registration information
  • In the Auth0 admin page, go to User Management > Users > Select the logged-in user.
  • Confirm that the form input information for the third login has been added to user_metadata and app_metadata.

in conclusion

On this page, we introduced how to achieve Progressive Profiling using the Auth0 Actions feature.
By utilizing the Actions function, you can flexibly respond to your requirements, such as changing the redirect conditions to the form, the content displayed on the form, etc. You can also try out Progressive Profiling in the free Auth0 trial environment.

If you are interested in implementing Progressive Profiling with Auth0, please contact us.

reference

Inquiry/Document request

In charge of Macnica Okta Co., Ltd.

Weekdays: 9:00-17:00