Auth / Login form by AngularJS

1,102 views
Skip to first unread message

Eugene Vilder

unread,
Jul 2, 2013, 4:11:38 PM7/2/13
to ang...@googlegroups.com
Hello people.
In last few days i try to find way to create login form... I surfed in net and find some examples but they not what I am looking...
I need simple but sequired login form by email and password.
Somebody can help me please?
Thanks.

Alecindro Castilho

unread,
Jul 2, 2013, 4:27:54 PM7/2/13
to ang...@googlegroups.com
Here:

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Josh David Miller

unread,
Jul 2, 2013, 5:12:28 PM7/2/13
to angular

Hello!

Do you need help with the view side of things or the service side of things? Are you wanting to secure only part of your site or the entire thing? What's your back end? More information will be helpful in trying to answer your question.

Josh
(Sent from my mobile)

--

Eugene Vilder

unread,
Jul 3, 2013, 4:35:03 AM7/3/13
to ang...@googlegroups.com
Hi. Josh.
I need a LOGIN controller (to understand how it works).
When I will log in I need to "save" somewhere this data for next visits ( if I closed the browser )...
I have a REST api in server side but I don't understand how to send parameters to service because angular removes password data if I take it from form...
Tnx;



2013/7/3 Josh David Miller <jo...@joshdmiller.com>

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/ZIvQ7_SciMA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Best Regards,
Eugene Vilder

Grant Rettke

unread,
Jul 3, 2013, 4:14:41 PM7/3/13
to ang...@googlegroups.com
On Wed, Jul 3, 2013 at 3:35 AM, Eugene Vilder <vilder...@gmail.com> wrote:
> I need a LOGIN controller (to understand how it works).
> When I will log in I need to "save" somewhere this data for next visits ( if
> I closed the browser )...
> I have a REST api in server side but I don't understand how to send
> parameters to service because angular removes password data if I take it
> from form...

Our auth server sends a session cookie that represents being "logged
in", that is how we manage that.

Josh David Miller

unread,
Jul 3, 2013, 4:19:16 PM7/3/13
to angular

A complete example of a login controller and it's associated services is available via angular-app: http://github.com/angular-app/angular-app.

Josh
(Sent from my mobile)

johntom

unread,
Jul 3, 2013, 11:16:55 PM7/3/13
to ang...@googlegroups.com
I suggest you look at https://github.com/fnakstad/angular-client-side-auth and then my implentation at https://github.com/johntom/Angular-Passport-Auth-SIO   which combines a few concepts and libs. I think this is eventually where you might wind up and think while it may take time to understand it's woth it.
John
.

Eugene Vilder

unread,
Jul 4, 2013, 2:18:13 AM7/4/13
to ang...@googlegroups.com
Thx,,, I saw these links, but they use NODEjs... I'm right ?
I'm looking for not node js...
I did something by my self yesterday, but my problem now is HOW TO set user login status to some global ( cookies or something... if it necessary ) and check this user status on each page I'm visiting to display relevant blocks...


2013/7/4 johntom <jrt...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/ZIvQ7_SciMA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jose Luis Rivas

unread,
Jul 4, 2013, 2:40:11 AM7/4/13
to ang...@googlegroups.com
I did it on localStorage.

It's something like `localStorage.setItem('token', 'asdoia902oi12ou8asjdlksdouiouOUQU!JL')`

And then on the .run of the angular app I make a call to my API server and check if the token is valid for that user.

You can get it with `localStorage.getItem('token')` and for clearing the localStorage do `localStorage.clear()`.

--
Jose Luis Rivas


On Wednesday, July 3, 2013 at 11:18 PM, Eugene Vilder wrote:

> Thx,,, I saw these links, but they use NODEjs... I'm right ?
> I'm looking for not node js...
> I did something by my self yesterday, but my problem now is HOW TO set user login status to some global ( cookies or something... if it necessary ) and check this user status on each page I'm visiting to display relevant blocks...
>
>
>
> 2013/7/4 johntom <jrt...@gmail.com (mailto:jrt...@gmail.com)>
> > I suggest you look at https://github.com/fnakstad/angular-client-side-auth and then my implentation at https://github.com/johntom/Angular-Passport-Auth-SIO which combines a few concepts and libs. I think this is eventually where you might wind up and think while it may take time to understand it's woth it.
> > John
> > .
> >
> >
> > On Tuesday, July 2, 2013 4:11:38 PM UTC-4, Eugene Vilder wrote:
> > > Hello people.
> > > In last few days i try to find way to create login form... I surfed in net and find some examples but they not what I am looking...
> > > I need simple but sequired login form by email and password.
> > > Somebody can help me please?
> > > Thanks.
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
> > To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/ZIvQ7_SciMA/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com (mailto:angular%2Bunsu...@googlegroups.com).
> > To post to this group, send email to ang...@googlegroups.com (mailto:ang...@googlegroups.com).
> > Visit this group at http://groups.google.com/group/angular.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
>
>
>
> --
> Best Regards,
> Eugene Vilder
> --
> You received this message because you are subscribed to the Google Groups "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com (mailto:angular+u...@googlegroups.com).
> To post to this group, send email to ang...@googlegroups.com (mailto:ang...@googlegroups.com).

Eugene Vilder

unread,
Jul 4, 2013, 2:48:46 AM7/4/13
to ang...@googlegroups.com
Will try it... Tnx


2013/7/4 Jose Luis Rivas <ghost...@gmail.com>
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.

Eugene Vilder

unread,
Jul 4, 2013, 12:19:55 PM7/4/13
to ang...@googlegroups.com
hm... I try to get login and password from form but the password is unvisible... when I change the <input type="password" to <input type="text"  - they both visible...

Why !!??


2013/7/4 Eugene Vilder <vilder...@gmail.com>
Reply all
Reply to author
Forward
0 new messages