Skip to content

txs/meteor-wecare-accounts-entry-flow-blaze-global

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a account Entry that works with FlowRouter 2.0 and Blaze layout. A fix to use Blaze layout instead of flow layout. Do the Blaze layout in a global way. .

Getting started

Install:

meteor add wecare:accounts-entry-flow-blaze-global

See the original package for more details on usage and examples. The differences are described here:

Ensuring signed in users for routes

Use the helper function AccountsEntrySignInRequired in an entry trigger for any route that requires users to be signed in. This will redirect the user to the included sign-in page and stop any rendering. Accounts-entry also tracks where the user was trying to go and will route them back after sign in.

Here is a route example:

FlowRouter.route('/dashboard', {
		name: 'dashboard',
		triggersEnter: [
			AccountsEntrySignInRequired
		],
		action: function(params) {
			FlowLayout.render('dashboard');
		}
	}
);

You can also apply this to every route at once (making sure to exclude the logged out route):

FlowRouter.triggers.enter([AccountsEntrySignInRequired], {except: ['loggedOut']});

If you want to change the render you can always use the triggers in FlowRouter:

FlowRouter.triggers.enter([trackRouteEntry], {only: ["entrySignIn"]});

About

Account Entry with FlowRouter and BlazeLayout in a global way

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published