I want to create a closed community. So I wold have a lot of users but all of them will be invited by myself or somebody. Moreover I want them to have only one option to login - social accounts.
I've implemented this functionality but for me it looks like set of hack:
1) forbid /api/register
endpoint to prevent self registration by the registration form
2) Do not create new user if it is still has not been created (here SocialService#createUserIfNotExist
)
3) Modify some email templates
My questions now are: 1) Is it is right way or you can suggest better solution? 2) Do you think that it may be a good option for further JHipster generator?
The most important thing is first to block the backend calls to the /api/register
endpoint by blacklisting it using .denyAll() in the security configuration. This will right away reject any request with HTTP 401 Unauthorized.
Secondarily you can work backwards and remove frontend and backend call.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With