Catch 22 - Can't use invitiations for a private wiki

If you set “Prevent unregistered users from viewing pages, regardless of the page or space rights” in order to prevent the general public from being able to see an XWiki setup on the web then you cannot use the invitation module. Anyone clicking the link will be redirected to a log-in page, which defeats the purpose.

If this is not possible, then what’s the approved way? I don’t want to create users manually because then I have to choose their usernames and an initial password. I also don’t want to manually have to disallow viewing to each space as its created, seems like a fragile approach from a security standpoint.

Any thoughts?