Authorization in GitLab

Hi guys. I have a question. How can I add a button to my component for authorize in GitLab, then after authorization I should redirect to my home page and set my username to the back-end? Thx