How to trigger social login in current tab instead of new window?
When i call the social login using angularx-social-login it will pop in new window.. i want to open it in current tab. could you please help me out?
Also looking for this. Can anyone please point us in the right direction? thanks in advance.
Following! This is also interesting from my point of view!
Does any one of you guys experiencing the fb dialog is block when you open the link of your app in fb browser?
Please check how Facebook suggests handling it. This library just delegates the login functionality to Facebook's authentication JS library.
Hi all.
Had this bug for a few days now. Here's what basically happens during the entire login process:
When FB Mobile Browser is used, the browser already acknowledges that the user has logged in. When FB.login is called, nothing happens. What needs to be done is the use the current accessToken and loggedIn userID to fetch the user's details and then pass it on wherever necessary.
FB.getLoginStatus((response: any) => {
if (response.status !== 'connected') {
return FB.login((response: any) => {
this.handleResponse(response)
}, {
scope: 'public_profile,email',
enable_profile_selector: true,
auth_type: 'rerequest',
return_scopes: true
});
} else {
this.handleResponse(response)
}
});
}
handleResponse(response) {
FB.api(`/me?fields=email,picture,first_name,last_name`,
(response: any) => {
this.tellServerToLogin()
})
}`
I am also facing the same issue with google login . On googling found a solution to add an option while calling socialAuthService.signIn(GoogleLoginProvider.PROVIDER_ID,options) method where options ={ux_mode: "redirect"} . Before performing login operation , we will have to provide redirect uri in google developer console as our current page (ex : http://localhost:4200 ) . I tried login after adding options. But not getting any response . What should i do ?
Sharing a comment from another related issue; please check if the following helps - https://github.com/abacritt/angularx-social-login/issues/263#issuecomment-652258506
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is really important. With this work around the social login only works when it use with facebook social login not nothing else. When a user navigates to the application through a facebook ad in mobile, it cannot be logged in through google. Is there any solution today for the google login when the application is opened from facebook on mobile? Thanks!!!
Hi. Ive experienced issue the same as yours, I open my web app in facebook app and the facebook login doesn't work. What fix my issue is that Ive given a setTimeout for about 2 seconds before initializing the facebook and that works for me. I dont know if that fix your issue just sharing what Ive encountered which same as yours.
What is currently the behaviour when you press on login with google through fb mobile app? Does the google login window closes?
On Fri, 5 Feb 2021, 2:40 pm Andrés, [email protected] wrote:
This issue is really important. With this work around the social login only works when it use with facebook social login not nothing else. When a user navigates to the application through a facebook ad in mobile, it cannot be logged in through google. Is there any solution today for the google login when the application is opened from facebook on mobile? Thanks!!!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/abacritt/angularx-social-login/issues/248#issuecomment-773828161, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNAKEHWK5WJGTZFK44OBADS5OHEHANCNFSM4KS767WA .
Ok, I got it.
The behavior is similar. When the user returns to the application once they have logged in with google, the authstate returns the user who has logged in.
It's just a matter of improving the experience.
The only thing I have had to do is set the redirect settings for google authentication
new GoogleLoginProvider (environment.google.loginProvider, {scope: 'email', ux_mode: 'redirect'})
and add the authstate check in the component's ngOnInit to see if the user is logged in to google or not.
Please, ignore my comment, I did not know that properties could be passed directly to google library from the provider 😅
Thanks, good job!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
For google provider, we can use
new GoogleLoginProvider (environment.google.loginProvider, {scope: 'email', ux_mode: 'redirect'})
How about Facebook provider? do we have any way to login with redirect mode instead of popup?
hi @jaibatrik
Thanks for the great plugin. Any progress on this one? Cheers!
hi all, do you have any suggestion on this issue?
It is a big impact thing because many users login from facebook application.
how did anyone fix this on mobile browsers ? I have this issue with certain browsers only, but it still is important. Currently I have removed the package for Facebook by manually doing it on my own backend. Considering discontinuing this package if this persists as it doesn't support mobile browser environment or doesn't guide on how to fix this issue.
For google provider, we can use
new GoogleLoginProvider (environment.google.loginProvider, {scope: 'email', ux_mode: 'redirect'})How about Facebook provider? do we have any way to login with redirect mode instead of popup?
I'm using version 1.2.5. in this version ux_mode does not exist in GoogleInitOptions
"@abacritt/angularx-social-login": "^1.2.5",
export interface GoogleInitOptions {
oneTapEnabled?: boolean;
scopes?: string | string[];
prompt_parent_id?: string;
prompt?: '' | 'none' | 'consent' | 'select_account';
}
Where should I set ux_mode to redirect?
I'd second that, where's the ux_mode to redirect? This is important to have and it's not there anymore.
+1. Any progress on the ux_mode property ?
+1. really need the redirect method.
Currently, our users have to enable the popup on their browser to see the login screen. I don't want that.