Comments (5)
@aksuhana
/login route is a frontend route, you will find it in the routes configurations inside the angular folder, it posts a request to /api/user/authenticate or something like that.
There isn't a connection between laravel and angularjs except for the index.blade.php which loads all angular files, other than that the frontend only takes data from the laravel api calls.
You should start with smaller, less complex projects in laravel and angularjs, this is a relatively complex integration between angularjs and a lot of libraries and laravel and a lot of libraries.
from laravel-angular-admin.
Thanks. One thing I am interested to know about the project is that, as there isn't a connection between laravel and angularjs except for the index.blade.php then How session is maintained using angular js as front end or JWT please explain it me in detail. I am stuck here. thanks in advance.
from laravel-angular-admin.
hi @aksuhana this is the code responsible for it API.service.js, it adds the token into request headers which is recognized by laravel api endpoints.
so right after user do a successful login the endpoint returns a token which angularjs save into browser local storage.
from laravel-angular-admin.
Thanks sir , but what I have seen that after storing value in local storage and then search in browser new tab windows it disappears, if such, then how session maintains after putting jwt (token) in browsers window browser local storage at It should destroy in browser new tab. But in this case still session maintains. Thanks for your great time for me. Thanks in advance for your valuable suggestion or reply
from laravel-angular-admin.
@aksuhana
localStorage persists even after closing tab or browser unless deleted explicitly or by key (an example which happens after logout if you've noticed in the code)
sessionStorage persists only per browser session, so it deleted itself after closing the whole browser not a tab.
so if you have no token in storage it will redirect you to login page and calls to api will not be authenticated. (now that's what should happen and to the extent of my knowledge also within the code here)
What's even more secure and best is to keep your site's data including token in cookie storage using ngCookies or cookie specialized package.
from laravel-angular-admin.
Related Issues (20)
- Karma not working with NgDescribe HOT 2
- can't login when run project HOT 2
- Cannot set property 'error' of undefined HOT 2
- Google Login Functionality
- Datatables pagination server side HOT 2
- The project are not going to run. where are problem ?? HOT 1
- Edit angular page/ component not work HOT 1
- which angularjs generator do you use?
- Role problem HOT 1
- Is this project still alive? HOT 2
- Bower Unexpected String in JSON at position 470
- unable to add new crud HOT 2
- gulp && gulp watch dont works
- How to activate new modules in it HOT 1
- file_get_contents(/Users/../build/rev-manifest.json HOT 3
- Laravel 5.2 + Dingo + JWT - Multiple Auth with different prefixes
- cannot register or login HOT 2
- installation error in localdevelopment HOT 3
- npm install error
- TypeError: Cannot read property 'message' of undefined On Login HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-angular-admin.