code: func (s *AuthServer) CreateGithubAuthRequest(req services.GithubAuthRequest) (*services.GithubAuthRequest, error) {
  	connector, err := s.Identity.GetGithubConnector(req.ConnectorID, true)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	client, err := s.getGithubOAuth2Client(connector)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	req.StateToken, err = utils.CryptoRandomHex(TokenLenBytes)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	req.RedirectURL = client.AuthCodeURL(req.StateToken, "", "")
  	log.WithFields(logrus.Fields{trace.Component: "github"}).Debugf(
  		"Redirect URL: %v.", req.RedirectURL)
  	req.SetTTL(s.GetClock(), defaults.GithubAuthRequestTTL)
  	err = s.Identity.CreateGithubAuthRequest(req)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	return &req, nil
  }
docs: // CreateGithubAuthRequest creates a new request for Github OAuth2 flow