Authentication for plugin

I am building a plugin that need users email when they install the plugin and send it to a endpoint for logging him/her to the system using a key or something. Can someone please help me out, how to make it possible?

1 Like