joscas / base_app Goto Github PK
View Code? Open in Web Editor NEWBase rails / mongodb / ember-js App
Base rails / mongodb / ember-js App
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
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.
@joscas I'm building my first Ember app, based on the project. I had some bugs that the new version of ember-auth resolves, but as a noob I'm struggling to translate this code to the new version.
I'm stuck right now with how to fix first line of this: https://github.com/joscas/base_app/blob/master/app/assets/javascripts/controllers/sign_in_controller.js
starter-app on Heroku displays Application Error
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.
If a user never enters the password_confirmation field in the signup form, it never goes through validation
Is it normal behaviour for this application to lose the user session upon a browser refresh?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.