• Daniel Hanke

    its an simplistic example indeed Nic, but storing the password in localStorage can be a big issue. Even though it might be an app, XSS vulnerability remains possible. Please dont take me bitchy, Cherrs.

  • Paul

    Thanks for the tutorial! I am new to ionic so please bear with me…

    Assuming my ionic app has 10 pages that all need to be protected, would I need to do the ‘password === empty’ check for all 10 pages? Or just the page that is directed from the login page?

    Or, another way to ask the same question. Can I assume users will not have the ability to directly access the ‘url’ of the pages in an app and I only need to secure the main page that is pointed to from the login page?

    Hope my question my sense and thanks in advance!

    • You should assume that users can directly access any url endpoint. With that said, you might create an AngularJS service that checks if the user is authenticated. This way you don’t have to repeat logic in every controller.

      Does that make sense?


  • Suresh Kumar Majhi

    “ionicViewService” is deprecated. Instead “ionicHistory” can be used.

  • shash

    I am new to ionic so please bear with me…
    Sorry for the silly doubt.,Hai what we have to write in protected.html…?

    Thanks in advance…

    • The content you want protected behind user login.

  • Mohan Gopi

    please can you make a video tutorial for this blog