Urigo / angular2-meteor-accounts-ui

18 stars 20 forks source link

RequireUser not working? #6

Closed twastvedt closed 8 years ago

twastvedt commented 8 years ago

I've added @RequireUser() as demonstrated in the tutorial, but when no one is logged in the annotated components still load and display.

dotansimha commented 8 years ago

@twastvedt Can you please provide more info? share code?

twastvedt commented 8 years ago

Ok, here's a repo that shows what I'm seeing: https://github.com/twastvedt/barbatus-typescript-bug-demo/tree/angular2-meteor-accounts-ui-bug It's possible I'm just completely missing the boat on how to use this.

mmccook commented 8 years ago

@dotansimha I'm also seeing the same issue.

I tried both @CanActivate and @RequireUser annotations but could only get @CanActivate to work .

Here is a repo with a branch showing how I'm trying to use RequireUser() : https://github.com/mmccook/mmccook.io/tree/repro-require-user

This can be found in /client/pages/basic/contact/index.ts, line 15. https://github.com/mmccook/mmccook.io/blob/repro-require-user/client/pages/basic/contact/index.ts#L15

The master branch of this repo has @CanActivate being used in place of the @RequireUser annotation and that is working.

If you need any additional information let me know.

onhate commented 8 years ago

Same here.

p3140 commented 8 years ago

+1

MichaelSolati commented 8 years ago

I may be obliviously stupid to this (only started working with Angular 2 seriously this week). Anyhoo I've had some difficulty getting the @CanActivate decorator to work. Mind you I've been using @angular/router package for my routing and not @angular/router-deprecated... (I am importing CanActivate from @angular/router-deprecated though!)

Is it safe to presume it's just an issue with the different routing packages?

sotille commented 8 years ago

Same problem here, following the tutorial, Angular2-Meteor. I can see the form, but I'm not logged. Some package like and @CanActivate ComponentInstruction is only available on @angular/router-deprecated. But tutorial do not mention this. Anyone solved the problem?

guidolodetti commented 8 years ago

+1

dotansimha commented 8 years ago

@twastvedt Are you still expiriencing it? Closing it for the moment, please feel free to re-open or create a new issue if you are still having this issue (and please provide an example for code or repo...) Thanks

twastvedt commented 8 years ago

Sorry, I'm not using Meteor at the moment, though there are enough comments here already to suggest it's still an issue.

helloncanella commented 8 years ago

I've provided a repo reporting the issue. It's avaible here

dotansimha commented 8 years ago

@helloncanella @twastvedt Please try to update to the latest version of this package, also, use the new AuthGuard instead with the new Angular 2 router. I tested it now on a clean project and it seems to work fine.

aayushsinghm16 commented 7 years ago

any alternative for accounts-google