Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally require fields before sending login link / logging-in #509

Merged
merged 4 commits into from
Feb 9, 2021

Conversation

zarathustra323
Copy link
Member

@zarathustra323 zarathustra323 commented Feb 8, 2021

Adds the ability, optionally, to require fields to be answered before a user receives a login link. This behavior is only applicable to unverified (new) users only -- this was done to prevent unauthenticated requests from modifying verified user data. This requires base-cms/id-me#81 to be merged and deployed.

To enable, the requiredLoginFields array must be set in the implementing website's IdentityX config. The fields that can be required are:

  • givenName
  • familyName
  • organization
  • organizationTitle
  • countryCode
  • regionCode
  • postalCode

For example:

// site.js
module.exports = {
  // other site config options...
  identityX: {
    requiredLoginFields: ['regionCode', 'countryCode'],
    // other identity-x config options...
  },
};

If a locale field is set (e.g. countryCode) the regional consent questions will also be prompted if a user selects a country with an enabled consent policy in IdentityX (e.g. Canada or the EU, etc).

Example flow:

Standard login screen
image

If the user is unverified and is missing the configured fields, they will be asked before sending the login link
image

If a country is selected that has a regional consent question, it will also be prompted
image

Once submitted, the login link will be sent as normal
image

The remaining authentication flow remains the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants