Hi David,
if your Client is using OIDC authorization_code flow, the best way is to create a redirection almost identical to the "Login" link but using https://{hostname}/auth/realms/{realm}/protocol/openid-connect/registrations instead of the authorization_endpoint.
This way, the user will register and then return to your redirect_uri with the code, so the flow continues and the user ends up logged in to your app, with the newly registered user.
e.g.:
https://{hostname}/auth/realms/{realm}/protocol/openid-connect/registrations
?
client_id={my_client_id}
&
redirect_uri={my_rerdirect_uri}
&
response_type=code
&
scope=openid%20profile
&
state={some_state}
HTH,
Gustavo