You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: oauth_login.go
    path of file: ./repos/dotenx/ao-api/controllers/userManagement
    
    the code of the file until where you have to start completion: package userManagement

import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"log"
	"net/http"
	"time"

	"github.com/dotenx/dotenx/ao-api/config"
	"github.com/dotenx/dotenx/ao-api/models"
	"github.com/dotenx/dotenx/ao-api/pkg/utils"
	"github.com/gin-gonic/gin"
	"github.com/sirupsen/logrus"
)

func (umc *UserManagementController) OAuthLogin() gin.HandlerFunc {
	return func(ctx *gin.Context) {
		code := ctx.Query("code")
		projectTag := ctx.Param("project")
		providerName := ctx.Param("provider")

		project, err := umc.ProjectService.GetProjectByTag(projectTag)
		if err != nil {
			ctx.JSON(http.StatusBadRequest, gin.H{
				"message": err.Error(),
			})
			return
		}
		provider, err := umc.OauthService.GetUserProviderByName(project.AccountId, providerName)
		if err != nil {
			ctx.JSON(http.StatusBadRequest, gin.H{
				"message": err.Error(),
			})
			return

    
func getTwitterAccessToken(clientId, clientSecret, code, redirectUrl, codeVerifier string) (string, error) {
	var dto struct {
		AccessToekn string `json:"access_token"`
	}
	data := "client_id=" + clientId
	data += "&code=" + code
	data += "&code_verifier=" + codeVerifier
	data += "&redirect_uri=" + redirectUrl
	data += "&grant_type=authorization_code"
	url := "https://api.twitter.com/2/oauth2/token"
	headers := []utils.Header{
		{
			Key:   "Content-Type",
			Value: "application/x-www-form-urlencoded",
		},
	}
	body := bytes.NewBuffer([]byte(data))
	helper := utils.NewHttpHelper(utils.NewHttpClient())
	out, err, status, _ := helper.HttpRequest(http.MethodPost, url, body, headers, time.Minute, true)
	log.Println("twitter response:", string(out))
	log.Println("-----------------------------------------------------------")
	if err != nil {
		return "", err
	}
	if status != 200 {
		return "", errors.New("not ok with status ")
	}
	err = json.Unmarshal(out, &dto)
	return dto.AccessToekn, err
}