Narcoleptic Programmers' Medicine
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    ember-auth-module-url-authenticatablepublic

    url authenticatable module for ember-auth

    Build Status Gem Version NPM version

    Allows auto sign in from entry points like /foo?token=abcd1234.

    Config

    App.Auth = Em.Auth.extend
      modules: ['urlAuthenticatable']
     
      urlAuthenticatable:
        # [array<string>] list of params used for authentication - those that 
        #   should be passed on to the server in the sign in call 
        params: []
     
        # [string|null] (opt) a different end point for sign in requests 
        #   from urlAuthenticatable 
        endPoint: null

    Usage

    # call _super() and follow the promise pattern 
    # if you override Ember.Route.beforeModel() 
    App.FooRoute = Ember.Route.extend
      beforeModel: ->
        @_super.apply(thisarguments).then -> doSomething()
      # or 
      beforeModel: ->
        doSomething()
        @_super.apply(thisarguments) # already returns promise 

    License

    MIT

    Keywords

    none

    install

    npm i ember-auth-module-url-authenticatable

    Downloadslast 7 days

    6

    version

    1.0.3

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar