Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tower.js with Passport demo app
CoffeeScript JavaScript
Tree: 3e63122099


Note, this is a work in progress, it's not fully setup yet.

See ./config/initializers/ to see how the wrapper is built internally.

This is how it's being used:

# config/
App.configure ->
  @use 'favicon', Tower.publicPath + '/favicon.png'
  @use 'static',  Tower.publicPath, maxAge: Tower.publicCacheDuration
  @use 'profiler' if Tower.env != 'production'
  @use 'logger'
  @use 'query'
  @use 'cookieParser', Tower.config.session.key
  @use 'session', secret: Tower.config.session.secret, cookie: {domain: Tower.config.session.cookie.domain}
  @use 'bodyParser', uploadDir: './public/uploads'

  Tower.Auth.initialize ->
    @provider 'twitter'
    @provider 'facebook', url: ''
    @provider 'github'
    @provider 'google'
    @provider 'linkedin'

  #@use 'csrf'
  @use 'methodOverride', '_method'
  @use Tower.Middleware.Agent
  @use Tower.Middleware.Location
  @use Tower.Middleware.Router
# config/
Tower.Route.draw ->
  @match '/auth/:provider/callback', to: 'sessions#create'

  @match '/', to: 'application#welcome'
class App.SessionsController extends Tower.Controller
  create: ->
    App.User.findOrCreateFromSession @request.authHash, (error, user) =>
      @render json: user


  • login with any of passport's strategies
  • send email once to users if they login with email
  • show counter on icons for each provider to show how many have logged in.
Something went wrong with that request. Please try again.