I'm thinking about designing the authentication way of a Joomla website.

There's an extensive tutorial on how to make a custom authentication plug-in, however a plug-by that kind will customize the behaviour on each log-in.

The behaviour I have to implement should take place only once throughout registration. Can there be in whatever way to implement this?

You will want to produce a user wordpress plugin that responds towards the onBeforeStoreUser event rather than an authentication wordpress plugin. The wordpress plugin creation process is very similar for user plug ins. The onBeforeStoreUser event receives two arguments: the consumer object along with a boolean flag showing set up user is a replacement.

You can try plugins/user/example.php to determine all the user wordpress plugin event handlers.