AngularJS: Basic example to use authentication in Single Page Application

后端 未结 6 1561
余生分开走
余生分开走 2020-12-02 03:30

I am new to AngularJS and gone through their tutorial and got a feel for it.

I have a backend for my project ready where each of the REST endpoints need

6条回答
  •  死守一世寂寞
    2020-12-02 04:04

    I like the approach and implemented it on server-side without doing any authentication related thing on front-end

    My 'technique' on my latest app is.. the client doesn't care about Auth. Every single thing in the app requires a login first, so the server just always serves a login page unless an existing user is detected in the session. If session.user is found, the server just sends index.html. Bam :-o

    Look for the comment by "Andrew Joslin".

    https://groups.google.com/forum/?fromgroups=#!searchin/angular/authentication/angular/POXLTi_JUgg/VwStpoWCPUQJ

提交回复
热议问题