Logins: Quick Guide
This guide provides an overview of how to set up and use external sign-in methods for any election and candidacy. To use external sign-in methods, you need to create and correctly set up a Login Hub.
Before creating and setting up a Login Hub, you should already have an election or candidacy set up. To do that, please take a look at some of our other guides:
*Note that this is a quick-start guide and it will not cover every possible configuration available within the system.
Start by creating a login hub by clicking on the “+ Hub“ button.
In the “Slug” text field, write a unique name for the hub. This corresponds to the URL name, and it will be displayed in the URL link used later on.
Now, click “Create Hub“ and you will see the following page:
Now, you need to configure different functionalities in the “Configuration“ tab, in the left-hand menu. Start by enabling the login and setting up the title and footer of the login.
Under the “Enabled“ function, select “Yes“.
Under “Locales“, select “English“ as the language for the hub.
In the “Title“ text field, write “Election 2025”. This corresponds to the title displayed in the login hub.
In the “Footer“ text field, write “This is the Login Hub”. This corresponds to the description of the login hub.
*An additional function you can set up is “Link Config”. If you enable “Auto redirect”: when the end-user clicks on the login link and logs in using the external method, they will be redirected automatically to the frontend instead of entering a hub. This only works if you configure one link in the setup.
2.1. SSO Configuration
Scroll to the “SSO Config” section, and select your chosen identity provider.
In “Login methods”, you need to select the login method that best applies to your organization.
*Note that the selected configurations shown in the images below are for internal testing purposes. Your view will correspond to the identity provider that has been setup for your use.
2.2. Frontend
In the bottom-left of the page, click on “Go to Frontend“ to see the frontend after the configurations. If you followed all the steps described above, then your frontend should look like this:
The next step is to create and set up a link group. A link group is essentially a division of end-users that will receive the specific link. To do this, go to the “Link groups“ tab, in the left-hand menu.
Now click on “+ Link group“ to create a new link group.
Under “Name“, write “ALL“.
Under “Description“, you can write a text that will be displayed to the end-user in the login hub, once they have signed in.
In this text field, you can use different injectable attributes that correspond to the same attributes in the Credentials data (read more here).
This means that the system will substitute the inject key for the credential’s name ( %{personal_info.name} ) with the corresponding credential’s name when they sign in.
Click “Create Link group“ to finalize the link group.
Now that you have created a link group, the page will look like this:
In the new “Links“ tab, that appeared after creating the link group, click on the button, which will lead you to create a link for the “ALL” group. Here, you need to select to which frontend the link leads: ElectaLogin, for any elections in Electa, and/or ElectaCandidacySamlLogin, for any candidacies.
Links to Electa
For a link that leads to an election, make sure to select ElectaLogin when creating the link. Now you need to fill out a set of fields, described below:
Name: This field should already be prefilled with the text “Login into Electa“, but you can change this into something else. Leave it be for now.
Button text: Write “Vote Now“.
Url: Insert the URL link to the election you wish it to lead to. Here, you can simply copy-paste the URL link from the election frontend. Make sure to delete the locale, e.g., “/en“ at the end of the URL.
Link to HTML target: Select where the link should open when clicked. It can either be “_blank“, for opening in a new browser page, or “_self“, for opening in the same browser page. Here, choose “_self“ for this example.
Terminate session: Enable this feature to end the user’s session on the login hub once they click this link. This will ensure that if a voter is using a public device to sign in they will be signed out as soon as they activate the link, leaving no unauthorised access behind.
Note that when enabled, this feature only works for elections that have only one voting round. For an election with multiple voting rounds with this feature enabled, the voter will only have access to click and vote on one of the voting rounds.
Skip the remaining fields as they are nice to have but not necessary for the link to function.
Once you have filled out the necessary fields, click “Create Link“.
Links to Candidacy
For a link that leads to a candidacy site, make sure to create a link ElectaCandidacySamlLogin. Now you need to fill out a set of fields, described below:
Name: This field should already be prefilled with the text “SSO link to Electa Candidacy“, but you can change this into something else. Leave it be for now.
Button text: Write “Register as a candidate“.
SSO service: Select the relevant SSO service.
Organisation slug: Write the slug of the organisation where the candidacy lives.
Candidacy slug: Write the candidacy’s slug.
For both Organisation and Candidacy slugs, see an example below of where to find the respective slug in the URL link:
https://electa.demo.assemblyvoting.net/candidacy/organisationslug/candidacyslug/en
Link to HTML target: Select where the link should open when clicked. It can either be “_blank“, for opening in a new browser page, or “_self“, for opening in the same browser page. Here, choose “_self“ for this example.
Terminate session: Enable this feature to end the user’s session on the login hub once they click this link.
Skip the remaining fields as they are nice to have but not necessary for the link to function.
Once you have filled out the necessary fields, click “Create Link“.
You can edit any links at any point, through the button for the respective link.
Credentials hold information about the end-users and correspond to identities in Candidacy and voters in Electa. This means that the identifier (or “Av”) of a credential in the Login Hub must be the same as their identifier in Electa and Candidacy. There are two ways of adding credentials to the Login Hub: first, through manually creating individual credentials, and second, through importing a .csv file containing the credentials’ information.
4.1. Create credentials manually
The manual creation of a credential is a quick way to add a few credentials if you need to test the login hub (or in case of missing credentials discovered at the last minute).
Go to the “Credentials“ tab in the left-hand side menu. On this page, you can see an overview of all credentials in the system.
Click “+ Credential“ to create a new credential.
You are now presented with all of the fields available for the credential, each of which you will need to fill out manually. Fill out each of the fields in the following manner:
Once you have filled in all of the required information, click “Create Credential“ to create the credential.
The credential has now been created, and the page you are on should display the information about the credential. This information can be edited by clicking on the “Edit” symbol.