When make login and refresh or reload page after login it come back to login page ?

15 views
Skip to first unread message

ahmed elbarbary

unread,
Oct 30, 2019, 2:08:47 AM10/30/19
to Angular and AngularJS discussion

on angular 7   When Make login and refresh or reload page after login it come back to login page 

I work on asp.net MVC project web API work with angular 7 project client side .

my problem is when I write user name and password correct  on angular 7 it make login success and go to dashboard page  after login succeed 

  but problem after i succeed login and go to dashboard if i make refresh or reload on page dashboard it go to the login page

  so that how to handle this echo on angular 7

Thang Le Duc

unread,
Oct 30, 2019, 3:48:52 AM10/30/19
to Angular and AngularJS discussion
Maybe the token have expired or the auth guard is not working properly, you can check them again.


Sander Elias

unread,
Oct 30, 2019, 3:51:28 AM10/30/19
to Angular and AngularJS discussion
Hi Ahmed,

You should store the token in localstorage or a cookie or something, and pick that up on app-start

Regards
Sander
Reply all
Reply to author
Forward
0 new messages