Differential / accounts-entry

Meteor sign up and sign in pages
http://github.differential.com/accounts-entry/
MIT License
305 stars 189 forks source link

How to use instructions #220

Open eholland7080 opened 10 years ago

eholland7080 commented 10 years ago

Hello...want to start by saying I really like this package. Looks very nice, I'm just not sure how to use it properly.

1) It says it relies on iron-router, does that mean it installs iron-router for me is is that something I need to install separately?

2) Do I need to create the sign-in, sign-up, dashboard templates and routes? What file do I create these routes in? There are routes.js files everywhere.

Based on these questions I'm sure you can tell I'm kind of new to meteor but I am a quick learner. :)

Thank you in advance Eric

rgoomar commented 10 years ago
  1. Iron router will be installed for you as a dependency when you install this package If you look at the smart.json file. It should be listed there and meteorite looks at that file to know which packages to install.
  2. No you do not. If you start your meteor project after installing this package, you should be able to go to http://localhost:3000/sign-in and see a sign-in form.

You can create your own customizations if you want to, but not necessary.

I hope that helps @eholland7080.

eholland7080 commented 10 years ago

Thank you rgoomar. I am getting close to understanding how to use.

Can you tell me what the /dashboard and /profile is used for? I had to create the dashboard template as it is the default route after you login. What is this /dashboard used for?

Also, I see references to a /profile in the documentation. What is the /profile used for?

Thanks Eric

rgoomar commented 10 years ago

The default route for a user to go to after successfully logging in is /dashboard and /profile is to go to the user's profile. You have to create your own template for both as they are not included, but it isn't hard to do.

You can customize where they go after successfully signing in by putting this:

AccountsEntry.config({
  dashboardRoute: '/custom-iron-router-route'
});

And so, it will go to that route which you have defined in your set of iron-router routes and will render that template for the user after successfully logging in.

I hope that helps @eholland7080

eholland7080 commented 10 years ago

Thanks you guys are awesome! So on a side note, I performed the following steps and got the following result:

meteor create testApp cd testApp mrt add accounts-password mrt add accounts-entry mrt add bootstrap-3 meteor

I then go to http://localhost:3000/sign-in

but instead of seeing the sign-in template, I see the default content of the new application.

what am I doing wrong?

Thanks Eric

eholland7080 commented 10 years ago

As a test I performed the following and it worked as designed: meteor create testApp cd testApp mrt add iron-router mrt add accounts-password mrt add accounts-entry mrt add bootstrap-3 meteor

I then go to http://localhost:3000/sign-in and see the see the sign in page. So with that said, it does appear that your need to run mrt add iron-router first. Those are just my test results. Does this make sense?

Thanks Eric

rgoomar commented 10 years ago

Yes because you need iron router to get any of the routing functionality. So, without that, it doesn't know where to point the route to.

eholland7080 commented 10 years ago

Thanks rgoomar! I must have misunderstood your first response above when you said:

"Iron router will be installed for you as a dependency when you install this package If you look at the smart.json file. It should be listed there and meteorite looks at that file to know which packages to install."

It does look like the accounts-entry package does install iron-router, but apparently not enough to make it work.

I'll make a mental note for all my future projects that I need to perform the following in this order:

meteor create testApp cd testApp mrt add iron-router mrt add accounts-password mrt add accounts-entry mrt add bootstrap-3 meteor

Thanks for your help. :)