-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Meteor 1.4.2+ #11
Conversation
Prefer dynamicHead API with fallback to old injection method. Support for Meteor 1.4.2+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib/server.js should use 2 spaces for tabs to match original coding style. But otherwise, it looks good to me, and I have it running flawlessly in development and production. (Caveat: I'm not super familiar with Meteor internals so I wouldn't spot any sneaky edge cases.)
nice work @abecks I tried your changes with meteor-react-router-ssr and it doesn't work as intended. Other packages like meteor-react-router-ssr also uses connect's middleware and calls The result is that the injected data which came after your middleware is never actually written to the boilerplate. I've got a few hacky fixes for this but I thought better mention this here first. |
Interesting. A better solution would be to make the It would also be great if Meteor checked the response for Edit: @mxs I wonder if adding a loose dependency on |
@abecks can we take this PR? How about this strategy: (Since I am leaving the project as well)
|
@arunoda Sounds like a deal. I have to continue to support FastRender and InjectData for my production app anyway. I've released I might be interested in maintaining By the way, thanks for all of your contributions to the Meteor community. There is a lot I could not have done without your packages. Edit: |
hi, @abecks just git clone & meteor npm install & meteor i added some console.log into the code.
yesterday, meteor-react-router-ssr author updated that his project is no longer in active maintenance. |
…ers.use`, including `reactrouter:react-router-ssr`
@comus I have released 2.0.3 of Thank you for the demo app, by the way. |
@abecks it works on my demo. Meteor.startup(() => { // <---------------------------
Telescope.routes.add([
{name:"posts.daily", path:"daily", component:Telescope.components.PostsDaily},
{name:"posts.single", path:"posts/:_id(/:slug)", component:Telescope.components.PostsSingle},
{name:"users.single", path:"users/:slug", component:Telescope.components.UsersSingle},
{name:"users.account", path:"account", component:Telescope.components.UsersAccount},
{name:"resetPassword", path:"reset-password/:token", component:Telescope.components.UsersResetPassword},
{name:"users.edit", path:"users/:slug/edit", component:Telescope.components.UsersAccount},
{name:"app.notfound", path:"*", component:Telescope.components.Error404},
]);
const AppRoutes = {
path: '/',
component: Telescope.components.App,
indexRoute: Telescope.routes.indexRoute,
childRoutes: Telescope.routes.routes
}
......
ReactRouterSSR.Run(AppRoutes, clientOptions, serverOptions);
}); so, it will not work if i just modify my demo code with
|
I just published 2.0.4 of |
I'll introduce myself over there. I'm going to close this PR now as its against my master branch which has many more changes, including the package name. Can you redirect this repo to mine? |
Could you send me PRs for both repos? |
Will do. Are you available at all for me to ask you questions from time to time regarding FastRender? I'm trying to diagnose an issue with the auth right now. How does FastRender accomplish the instant login feature? |
Yes sure. I could answer.
FastRender saves the loginToken into the cookies. We do it with a client side code. |
How does Meteor.user() become instantly available on the client? I have an issue where the FastRender payload contains the user object, but Meteor.user() is undefined until the Meteor's delayed authentication kicks in. |
We add all the data we got to the collection via inject-data. |
How does Meteor know which user document is the one the login token is for? For example, lets say you were sending multiple users in the FastRender payload. How does it know which one to authenticate as? I was thinking it was using the login token, but its not present in the payload's user object. Edit: Found what I was looking for https://github.com/meteor/meteor/blob/87681c8f166641c6c3e34958032a5a070aa2d11a/packages/accounts-base/localstorage_token.js#L117 |
Please merge this PR! :) |
@DenisGorbachev it's not possible due to compatibility issues. Check above. |
Prefer dynamicHead API with fallback to old injection method. Adds support
for Meteor 1.4.2+