{"action":"closed","issue":{"url":"https://api.github.com/repos/sarfarazansari/ng4-social-login/issues/20","repository_url":"https://api.github.com/repos/sarfarazansari/ng4-social-login","labels_url":"https://api.github.com/repos/sarfarazansari/ng4-social-login/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/sarfarazansari/ng4-social-login/issues/20/comments","events_url":"https://api.github.com/repos/sarfarazansari/ng4-social-login/issues/20/events","html_url":"https://github.com/sarfarazansari/ng4-social-login/issues/20","id":331108721,"node_id":"MDU6SXNzdWUzMzExMDg3MjE=","number":20,"title":"Having to click twice on the social login button before it activates","user":{"login":"bjornharvold","id":641791,"node_id":"MDQ6VXNlcjY0MTc5MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/641791?v=4","gravatar_id":"","url":"https://api.github.com/users/bjornharvold","html_url":"https://github.com/bjornharvold","followers_url":"https://api.github.com/users/bjornharvold/followers","following_url":"https://api.github.com/users/bjornharvold/following{/other_user}","gists_url":"https://api.github.com/users/bjornharvold/gists{/gist_id}","starred_url":"https://api.github.com/users/bjornharvold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjornharvold/subscriptions","organizations_url":"https://api.github.com/users/bjornharvold/orgs","repos_url":"https://api.github.com/users/bjornharvold/repos","events_url":"https://api.github.com/users/bjornharvold/events{/privacy}","received_events_url":"https://api.github.com/users/bjornharvold/received_events","type":"User","site_admin":false},"labels":[{"id":688874529,"node_id":"MDU6TGFiZWw2ODg4NzQ1Mjk=","url":"https://api.github.com/repos/sarfarazansari/ng4-social-login/labels/help%20wanted","name":"help wanted","color":"33aa3f","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-11T09:21:30Z","updated_at":"2018-06-13T06:12:26Z","closed_at":"2018-06-13T06:12:26Z","author_association":"NONE","body":"This is an Angular 6 app using rxjs6\r\n\r\nThis method is bound to my HTML button:\r\n```\r\nsignInWithFacebook(): void {\r\n    console.log('clicked');\r\n    observableFrom(this.authService.signIn(FacebookLoginProvider.PROVIDER_ID)).pipe(\r\n      takeWhile(() => this.alive)\r\n    ).subscribe((user: SocialUser) => {\r\n      this.loginWithSocial(user);\r\n    });\r\n  }\r\n```\r\n\r\nWhen I click my \"Login with Facebook\" button, the click registers with the logger but the signIn method never actually starts. When I click the button a second time, the logger registers it again and this time, the signIn process starts with any social provider.\r\n\r\nI switched to this, more pragmatic, approach instead of listening to authState. authState stopped reporting a successful login and I didn't have much time to look into why. I am also wrapping the Promise in an Observable as I use Observables everywhere.\r\n\r\nAny advise would be helpful.\r\n\r\nI am using Angular v6.0.4, Angular CLI 6.0.8 and latest ng4-social-login.\r\n"}}
{"actor":{"display_login":"sarfarazansari"}}