Require consent + link to terms/privacy policy at sign up

Almost any website needs either terms of use or a privacy policy or falls under government regulations like GDPR and others. In terms of legal security, data protection and user transparency it would be amazing to have a setting inside portal to add a check box with a customizable text and link field to the sign up form just between name/email and the sign up button

Alternatively a simple customizable line of text where I can make a statement like “by signing up you agree to the terms of use/privacy policy” + add a link to the policy

Anybody have a workaround for that already or a suggestion on how to implement that on my site?

Cheers!