Skip to content

How to Create an SSO User for Your Locally Running Monolith

Rationale

When developing parts of the Statista system, you will likely run the monolith (configfrontend) on your local machine to test your implementation.

Many test cases require a logged-in state, and to log in, you need a test user. This section explains how to create test users for various testing scenarios.

SSO with Auth0

Currently, you should only use test users compatible with Auth0 SSO, as required by the migration to the new Statista 4.0 stack.

However, to maintain backward compatibility with some legacy development servers, the monolith's configuration still defaults to legacy login methods. You need to change this in the parameters_dev.yml file.

For convenience, it is best to rely solely on username/password logins. To do this, set the UsernamePasswordLoginFeature to true in src/frontendbundle/Resources/config/sso/parameters_dev.yml:

Stat\FrontendBundle\Services\Feature\UsernamePasswordLoginFeature: true

Soon, the architects and the CPE team will shut down and dismantle the legacy development servers, removing this option. At that point, Auth0 SSO will be the only option and set by default.

Registering a User

To register a user, follow the normal registration flow. On any platform page, click "Login" and then "Register now". You will be redirected to the registration page, where you can create a new user.

Alternatively, you can directly open the /register route.

Image of the Statista registration form.

You will find a set of different account types:

  • Business
  • Academic
  • Private

We recommend choosing a private account as it is the easiest to set up and sufficient for most test cases. The other two account types have special characteristics that are not covered here. If you work on features requiring these account types, you likely already know about them.

After selecting "Private", you can freely enter data into the fields except for the email address. Please read the next section regarding the correct email address.

The data will be created in a development user database.

Email Address

:warning: Be careful not to enter existing email addresses of other people. Emails are actually sent to all entered email addresses, and there is currently no filter implemented.

If you need the test account only for your own testing activities, we recommend using your personal Statista email address with optional plus addressing.

By adding a plus sign (+) and a suffix after your name in your email address, you can register multiple users without receiving a duplicate email address error. Here are some examples:

This way, you can create multiple test users and organize them by keywords like ticket numbers or features.

Account Activation

After creating your test user, you will see a page instructing you to activate your newly created user by opening a link sent to your email address.

Image of the account activation page that shows after registering a new user.

There are three ways to activate the account:

  1. Click the link in the activation email (recommended).
  2. Use the CRM tool to activate the account as an admin.
  3. Change the account status field in the database (not recommended).

Account Modification

You might want to change certain data or settings for your account at some point.

Some data, like the name, address, or newsletter preferences, can be changed by the account holder. Simply log in and click on "My account" on most platform pages.

Additional data, like assignment to a group account or blocked status, can be changed via the CRM. For information on accessing the CRM, please check out the Tech User Tools team page.