Purpose:

This example shows you how to build registration and login links on your webpage, defining a different callback and pass the needed entry point for each case.

Example 1: get the login link

In most of the cases, the default usage to get the login URL is the following:

Example 2: get the registration link

Also for registration, the default usage is the following:

Example 3: get login link passing an alternate callback URL

The following example show how to compose a login URL that use a different callback than the default configured.

The callback URL is the URL that the user browser will be redirected after performing any action with DRUID, such as login or register. Sometimes you need to pass a different callback URL for some actions in your website. In that case, you can pass the callback URL as a parameter. Remember that you should have added first the callback URL to the site.

Remember that any callback URL must be registered before using it in the DRUID cockpit.

Example 4: get login link passing an alternate entry point

A client configuration (the configuration that you do for your website or app) can have as many entry points as you want. But it will always have a main entry point at least.

As an entry point is a specific set of configurations, i.e.: the requested fields (name, surnames, mail, etc.), the T&C, the user typologies…are associated to the entry point. It also serves to identify who registers and how, so for all the cases, you allways can say “This user registered with that entry point”

For each entry point of the client, the necessary options are defined and configured. In the case of the fields that will be requested, the entry point indicates to the system -for example- which ones are mandatory and which ones aren’t.

In the following example, we are calling the login URL passing the ID of the entry point we will need to use. So the registration system will use that entry point ID to configure the registration screen according to the configuration of that entry point that we previously set during the site configuration.

Example 5: complete example

Find below how your entire page should appear. The example is rendering the login and Register links.