Mean Stack simple application login with google and apply local strategy both

application

login with google and local strategy apply doth are implement in mean stack 

application must inclune bunyan logger 

Solutions (1)
  • Sudarshan Vishwakarma 2 weeks, 6 days, 4 hours, 56 minutes ago

    use local storage after success full login then set success response like

    response: 

    let data ={
    "email":demo@gmail.com,
    "id":1
    }
    localStograge.setItem("user-data",JSON.stringify(data));

    then check ngOnInit function local storage exist or is null

    ngOnInit(){
       if(localStograge.setItem("user-data") && JSON.Parse(localStograge.setItem("user-data")).id){
          // manage if condition
       }else{
         // manage else condition
      }
    }



Your Answer To Login
Add Answer