Coder Social home page Coder Social logo

ember-devise-simple-auth's People

Contributors

abuiles avatar joefiorini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-devise-simple-auth's Issues

Client side validation

What is the recommended way to handle client side validation for login? I added ember-validations to the session model, but it seems to POST to the login URL no matter what.

Allow configuring user model

For those using ember-data, allow specifying userTypeKey in the configuration. Load currentSession as that model through the store.

ember-app-kit/ember-cli support

Currently the app namespace is configurable in eak. I'm going to recommend following the eak-rails convention there so this will be easier to support.

Don't make ajax request on loadSession if isSignedIn

Currently there is a request every time we change routes, what about not doing it if we already have a currentSession?

Is there a reason for making always this request? Maybe we could handle at a higher level 401, and then try to get the /session/current/redirect to sign-in.

Don't use bind

The following blows up when running with phantomjs this.setupSession.bind since bind is not implemented.

How to integrate with signup

I'm trying the method that @abuiles uses in Fractura, to sign up a user through Devise, but even though I have everything regarding sign-up matching his. I'm still getting these transitions when I navigate to /#sign-up:

Transition #0: TRANSITION COMPLETE. ember.js?body=1:15374
Ember Inspector Active VM4204:161
Attempting transition to signUp ember.js?body=1:15374
Attempting transition to session ember.js?body=1:15374
Transition #1: signUp: transition was aborted ember.js?body=1:15374 
Transition #2: session: calling beforeModel hook ember.js?body=1:15374
Transition #1: detected abort. ember.js?body=1:15374
Transition #2: session: calling deserialize hook ember.js?body=1:15374
Transition #2: session: calling afterModel hook ember.js?body=1:15374
Transition #2: Resolved all models on destination route; finalizing transition. ember.js?body=1:15374
Transitioned into 'session' ember.js?body=1:15374
Transition #2: TRANSITION COMPLETE. 

I made sure that the route for sign-up contains skipsAuthentication: true, but it seems that some hook in devise is making it go back to the sign-in template. I'm fairly new to Devise with Ember so I'm sure I'm missing something, I just don't really know where to start looking. Any ideas?

Sign in not working

When i try to sign in, the session controller searches for a user by id. This is from console:

Started POST "/users/sign_in" for 127.0.0.1 at 2014-04-11 13:25:04 +0200
Processing by EmberDeviseSimpleAuth::SessionsController#create as JSON
Parameters: {"user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]"}}
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Completed 201 Created in 6ms (Views: 1.2ms | ActiveRecord: 0.4ms)

Is this right? Im using EAKR and have the same setup as the facturas sample app

Use currentUser instead of currentSession.

A session can have more that just an user, since this is just an user object It would be better to have this called currentUser which makes clearer that it is an user object.

Working globals support

Sounds like es6-module-transpiler will be losing support for globals. The new recommendation is to wrap AMD modules with a loader. We'll add a file that creates the global objects on Ember.DeviseSimpleAuth. The only problem is going to be SessionsRoute. Since we won't know the name of the Ember.Application global at require time. Options are:

  1. Manually register route:session on the container
  2. Provide an exportOn function that takes the global and assigns objects to it

Does anyone have a preference?

Default Settings using different key than Readme Instructs

In the readme it says to configure this way:

window.App = require('app').default.create({
  deviseEmberAuth: {
    // ...
  }
});

However, in the index.js file the get setting key uses the deviseSimpleAuth prefix:

    var getSetting = function(app, setting) {
      var prefixedKey = "deviseSimpleAuth." + setting;
      return app.getWithDefault(prefixedKey, defaults[setting]);
    };

One or the other should be updated but I'm not sure which. Thanks!

Current Session Unauthorized 401

Hello,

I've installed simple-auth via bower and gem for client and server-side. I've also created the session template with a form with a call to the signIn action. However when I click on it I get a 401 unauthorized response for /sessions/current.

GET "sessions/current" processing by EmberDeviseSimpleAuth::SessionsController#show as JSON completed unauthorized in 1ms

I am using ember-rails 0.15, Rails 4 and Devise

Do you think it could be a Simple-Auth thing or is it maybe more Devise related?

Thanks in advance

Sprockets Error loading in EAK

After loading gem, bundling, running the generator, and setting up my application.js, I get the following Sprockets error:

Sprockets::FileNotFound at /
couldn't find file 'ember-devise-simple-auth/appkit'
  (in /Users/[...]/config/application.js:5)

Here's my config/application.js

//= require jquery
//= require environment
//= require ember-appkit
//= require router
//= require ember-devise-simple-auth/appkit
//= require_self
//= require_tree ./adapters
//= require_tree ../app
//= require_tree ./initializers

require('ember-devise-simple-auth');

window.App = require('app').default.create({
  deviseEmberAuth: {
    signInPath: "/sign-in", 
    deviseSignInPath: "/users/sign_in",
    deviseSignOutPath: "/users/sign_out",
    currentSessionPath: "/sessions/current"
  }
});

Grunt Workflow

Broccoli is awesome for a build tool, but I'd like to replace build.sh with a proper grunt workflow that can handle releasing too.

Implementing redirects: export default?

I have almost everything set up and working fine - thanks for a great gem! However I am trying to redirect after signin. I added the below to application.js, from the docs:

export default Ember.Route.extend({
  actions: {
    validSignIn: function() {
      this.transitionTo("compose");
    }
  }
});

I tried that but I just get Uncaught SyntaxError: Unexpected reserved word I've googled around, and I guess I'm missing some dependency, but to be honest most of what I read about export module was beyond me.

I tried adding the same action to application.js without the export default part and the redirect still doesn't work:

Ember.Route.extend({
  actions: {
    validSignIn: function() {
      this.transitionTo("compose");
    }
  }
});

Am I missing something obvious?! Any help appreciated.

Can't install directly from github.

It depends on 'dist/bower.json' but it's not found.

There was a Errno::ENOENT while loading ember_devise_simple_auth.gemspec: 
No such file or directory - /Users/adolfo/.rvm/gems/ruby-2.0.0-p0@facturas/bundler/gems/ember-devise-simple-auth-7f420775a30e/dist/bower.json from
  /Users/adolfo/.rvm/gems/ruby-2.0.0-p0@facturas/bundler/gems/ember-devise-simple-auth-7f420775a30e/ember_devise_simple_auth.gemspec:4:in `<main>'

Upgrading to newest javascript file constantly redirects to sign-in

The old version as of (March 11th/13th) works fine for me, but when upgrading to the newest version that deserializes the /sessions/current user information into ember data, it breaks the front-end functionality for me. The old version uses: currentSession, the new version uses: currentUser.

I am using ember-rails.

After some testing, I discovered the problem seems to be the new javascript code. The GEM upgrade still lets me access the /sessions/current information via rails (and still works when I leave the old index.js version in place), but when I try to replace the index.js file with the new version, it constantly redirects me to sign-in no matter what I do.

I tried both with and without a user model created in Ember.

Any help would be appreciated!

All the best,

Jason

How do I use currentUser?

I found this problem, When my route get the data from server and counld not use currentUser in the template. Like this:

App.OrdersRoute = Em.Route.extend

  model: ->
    App.Order.findAll()

And In my orders.hbs and the currentUser is null.
But if I remove the model like this:

App.OrdersRoute = Em.Route.extend()

It will can find currentUser. Is it something wrong with my code?or the other?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.