Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Using ionViewCanEnter to validate Login

$
0
0

@luizricardoso wrote:

In the browser, if I enter the URL:

localhost: 8100 / # / home

the system will redirect to

localhost: 8100 / # / signin

if the user is not logged in.

The problem is that using ionViewCanEnter, before running setRoot()

  ionViewCanEnter() {
    if (this.authProvider.verifyAuthentication() == false) {
      this.navCtrl.setRoot('signin');
    }
  },

the HomePage is quickly appearing.

I need a way for when the user accesses

localhost: 8100 / # / home

through the URL of the Browser, redirect to

localhost: 8100 / # / signin

without quickly displaying HomePage.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>