   link: (provider) ->
 
     kd.singletons.oauthController.redirectToOauthUrl { provider }
+    new kd.NotificationView
+      title: "Redirecting to #{@providers[provider]}..."
 
 
   unlink: (provider) ->

        cssClass: 'container hidden'

      @containers[provider].addSubView new kd.CustomHTMLView
        partial: "#{provider.capitalize()} Integration"

      @containers[provider].addSubView @switches[provider]


  handleForeignAuth: (provider) ->

    @whenOauthInfoFetched provider, =>
      kd.utils.defer -> new kd.NotificationView
        title: "Your #{provider.capitalize()} integration is now enabled."
      @linked[provider] = yes
      @switches[provider].setOn no


  whenOauthInfoFetched: (provider, callback) ->

    if @fetched[provider]
      do callback
    else
      @once "OauthInfoFetched.#{provider}", callback


  viewAppended: ->

    me = whoami()
    me.fetchOAuthInfo (err, foreignAuth) =>

      return showError err  if err

      new kd.NotificationView
        title: "Your #{@providers[provider]} integration is now disabled."

      @linked[provider] = no

