The invitation of a user is a little complex. I think that a typical scenario is : I share a document with a link, the user looks at the document, in parallel I encourage him to create a cryptdrive, then he creates his account, chooses to put its previously shared pads in the drive, finally sends (by pigeon) his public key to the requestor.
Why not create a "special" document type (toto.invite) where I could put one user (his mail) to invite ? It generates a link, when the guest opens the document, he is proposed to either have an account created in cryptpad;.fr or use a previously existing account. If he accepts (by clicking on a link), an account is created with his mail. Then the existing public key is sent to the "requestor". So the whole process is done during the visualisation of this "fake" document.