I’m using a non-interactive client to create users that can then log in via my SPA client.
The users are being created without problem, but the verification email uses the non-interactive client’s name instead of my SPA client’s name.
Is there a way to change this, without hardcoding the SPA client’s name in the verification email template?
You should be able to accomplish your goal if you take a two-step approach to the problem:
- Create the user by using the POST
/api/v2/users
endpoint; as part of the payload include "verify_email": false
so that the verification email is not sent immediately.
- Request a verification email to be sent by using the POST
/api/v2/jobs/verification-emai
endpoint; as part of the payload you would include "client_id": "[spa_client_id]"
so that the verification email is sent within the context of the desired client application.