Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 231634

Authentication Ionic + Laravel

$
0
0

Assuming that you return user info from the back end just do something like this to check what is being returned

this.http.post(this.api+'auth', creds, {headers: headers}).subscribe( data => {
            if(data.json().success){
                console.log(data.json().success);
                this.storeUserCredentials(data.json().success);
                resolve(true);
            }

If username is something being returned you can do

this.username = data.json().sucess.username

Viewing all articles
Browse latest Browse all 231634

Trending Articles



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