Authenticate before submit

Hello,

I am trying to create a form where the user needs to authenticate before clicking submit and It would be great if someone can suggest a solution for this because i can’t find one so far.