consentGiven
property, with true/false values, shows if the user has provided consent (true) or not (false)consentTimestamp
property, holding the Unix timestamp of when the user-provided consentSingle Web Page Applications
as type.
http://localhost:3000
.
This field holds the set of URLs to which Auth0 is allowed to redirect the users after they authenticate. Our sample app will run at http://localhost:3000
hence we set this value.
Lock
. The code block will be pre-populated for you.
consentGiven
metadata, use the mustAcceptTerms
option. To include links to your Terms & Conditions and/or privacy policy pages, use the languageDictionary
option. To learn more, read Lock Configuration Options. The example below displays text that says I agree to the terms of service and privacy policy
(including links to both pages) next to the flag:
consentGiven
metadata property, create a new Action. Enter a descriptive Name for your Action (for example, Set consent flag upon signup
), select the Login / Post Login
trigger because you’ll be adding the Action to the Login flow, then select Create.
consentGiven
metadata to true
if it is not already set (which means it’s the first login after a signup).
Lock
. The code block will be pre-populated for you.
consentGiven
metadata, use the additionalSignUpFields
option. To learn more, read Lock Configuration Options. The example below sets the type to checkbox
(so we have a flag), the label to I consent to data processing
, and the default value to checked
.
consentGiven
and set the additional consentTimestamp
metadata to the current timestamp.
Redirect to consent form
), select the Login / Post Login
trigger because you’ll be adding the Action to the Login flow, then select Create.
CONSENT_FORM_URL
your-consent-form-url.com
(Be sure to provide the publicly-accessible URL where your consent form can be found.)http://localhost:3000
. Click Login. Once Lock is displayed, click Sign Up.
The login page will be served by default at YOUR_DOMAIN/login
. To learn how to use your own domain, read Custom Domains.
I consent to data processing
flag checked. Click Sign Up.
Unauthorized. Check the console for details.
. At the console you will see this JSON: