 
     if privateToken
       @importStackTemplateWithPrivateToken privateToken, urlData, callback
+    else if oauth = user.getAt 'foreignAuth.gitlab'
+      @importStackTemplateWithOauth oauth, urlData, callback
     else
       @importStackTemplateWithRawUrl urlData, callback
 

    }

    queue = [
      (next) ->

        gitlab.projects.all (projects) ->

_           = require 'lodash'
GitlabAPI   = require 'gitlab'
KodingError = require '../../error'
KONFIG      = require 'koding-config-manager'


getPrivateToken = (options, callback) ->

  { urlData: { baseUrl }, token } = options
