locked
When Make login and refresh or reload page after login it come bake to login page ? RRS feed

  • Question

  • User696604810 posted

    problem

    When Make login and refresh or reload page after login it come bake to login page ?

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

    my problem is when write user name and password correct it make login and go to dashboard page that I done to work after login succeed .

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

    so that how to handle this echo on angular 7 .

    Wednesday, October 30, 2019 3:16 AM

All replies

  • User1724605321 posted

    Hi ahmedbarbary,

    Could you please show us how do you implement the login logic . You can also refer to below code sample for details :

    https://jasonwatmore.com/post/2018/10/29/angular-7-user-registration-and-login-example-tutorial

    Best Regards,

    Nan Yu

    Thursday, October 31, 2019 7:04 AM
  • User-1780421697 posted

    In case of Single Page Applications, Most of the time you have to Store Identity/Auth Token in browser local storage and then by pass authentication challenge when token is valid, you need to check that. If your auth token is not properly stored in cookies or local storage then when ever you made refresh request, you lost token and all gone. there may be other possible factors like your browser have some sort of restrictions etc.

    Monday, November 25, 2019 7:37 AM