Coder Social home page Coder Social logo

base_app's People

Contributors

joscas 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

Watchers

 avatar  avatar  avatar  avatar

base_app's Issues

Dealing with 401 (Unauthorized)

Thanks for the quick update @joscas to get the demo updated for the latest ember-auth.

I'm working on getting CRUD working for another model, and the hardest part for me is figuring out where and how to deal with the 401 Unauthorized issue.

Seems I need to ensure the user is signed in, so that I have a token for... getting the model without a 401.

I'm working on the show route, and using app/assets/javascripts/routes/users/show_route.js as a guide, but it doesn't work exactly because I don't have an object to transitionTo in the signInSuccess handler.

Would it be interesting to add another model to the project, so sample code for how to handle this problem would have a good home.

Thoughts? Have any sample code available to show how to deal with refreshing a URL that has a model that needs to be put behind authorization?

Update: Actually users.index suffers from the same 401 Unauthorized problem that I'm dealing with.

So I can reload /users/:user_id page just fine, but /users yields 401 and redirects to route actionRedirectable.signInRoute that is specified in ember-auth.

User edit route refresh doesn't authenticate with cookies

Josep,

I don't have a test for this yet to show what's happening, but if you login as the admin user, navigate to the profile information, and refresh the page, you'll get a 401 and no redirect. I'm not sure I understand exactly why yet. It seems the user show route is an Auth route, so I thought it should be sending the cookie in that case?

Joe

Application template rendering twice

Josep,

I suspect this is another issue with ember-auth / ember and not base_app, but I'm noticing something strange. If you look at the active_record branch (https://github.com/jhosteny/base_app) of my fork of your latest code, you can see that attempting to perform a render into a named outlet ('sidebar') inside of the application route's renderTemplate function, the whole thing is inserted twice.

I'm trying to see if I can understand why this is happening right now, but I'm wondering if perhaps you've noticed this?

To reproduce, you have to login and navigate to home, and then navigate to home again by refreshing the page.

  • Joe

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.