Hi, I am trying to implement custom registration page with email verification for our experience site, but when I am trying to initiate verification I am getting 'System.NoAccessException : Unable to generate security token'. Can you help me here to find out what permission I am missing here? #*ExperienceCloudShowMeHow #Self Registration #Salesforce Identity
For anyone that might come across this issue in the future, I discovered that this error was presented if the email address of the user being registered was sent 5 or more verifications within the last hour. Though, there may be other reasons for the System.NoAccessException in the context of the UserManagement.initSelfRegistration
method.
In my case, I was developing and testing a custom login flow, and I sent many verification requests to the same email address within a short period using the
UserManagement.initSelfRegistrationmethod. Waiting for over an hour resolved the issue, and I was able to resume testing with the email address. Also, using a different email address worked.
Salesforce specifies here,
System Verification Codes Not Received for Salesforce, that "Salesforce has a limit of 5 email verification codes per hour"