Reputation: 179
after login to Facebook and Google using this
I am unable to signout for Google and Facebook with this code.
this.authService.signOut();
sessionStorage.clear();
Can anyone please help me!
Upvotes: 3
Views: 3298
Reputation: 41
import { SocialUser , SocialAuthService } from 'angularx-social-login';
...
socialUser: SocialUser;
constructor(private socialAuthService: SocialAuthService) {}
...
signup(){
...
this.socialUser = userData;
...
}
logout() {
...
if(this.socialUser !== null) {
this.socialAuthService.signOut();
}
}
This worked for me to Logout from Google using angularx-social-login npm module link
Upvotes: 0