sabyasachibiswal / angular5-social-login Goto Github PK
View Code? Open in Web Editor NEWSocial authentication module for Angular 5. Includes Facebook and Google login with AOT compatibility.
Social authentication module for Angular 5. Includes Facebook and Google login with AOT compatibility.
Hello. I try to use google auth with your library. After config by your readme and click to login button by google i can seed google window with my account. After select account in console display error 'popup_closed_by_user' http://prntscr.com/ijzh8r. Please help me
How do I call the logout?
ERROR in ./node_modules/angular5-social-login/angular5-social-login.umd.js
Module not found: Error: Can't resolve 'rxjs/BehaviorSubject' in 'C:\Users\Stephen Jawahar\login\node_modules\angular5-social-login'
i 「wdm」: Failed to compile.
ERROR in node_modules/angular5-social-login/auth.service.d.ts(1,10): error TS2305: Module '"C:/Users/Stephen Jawahar/login/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
src/app/app.component.ts(13,38): error TS2304: Cannot find name 'OnInit'.
src/app/app.module.ts(21,23): error TS2304: Cannot find name 'GoogleLoginProvid'.
can someone help me with this error
core.js:1448 ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[SigninComponent -> AuthService]:
StaticInjectorError(Platform: core)[SigninComponent -> AuthService]:
NullInjectorError: No provider for AuthService!
Error: StaticInjectorError(AppModule)[SigninComponent -> AuthService]:
StaticInjectorError(Platform: core)[SigninComponent -> AuthService]:
NullInjectorError: No provider for AuthService!
at NullInjector.get (core.js:1002)
at resolveToken (core.js:1300)
at tryResolveToken (core.js:1242)
at StaticInjector.get (core.js:1110)
at resolveToken (core.js:1300)
at tryResolveToken (core.js:1242)
at StaticInjector.get (core.js:1110)
at resolveNgModuleDep (core.js:10854)
at NgModuleRef.get (core.js:12087)
at resolveDep (core.js:12577)
at NullInjector.get (core.js:1002)
at resolveToken (core.js:1300)
at tryResolveToken (core.js:1242)
at StaticInjector.get (core.js:1110)
at resolveToken (core.js:1300)
at tryResolveToken (core.js:1242)
at StaticInjector.get (core.js:1110)
at resolveNgModuleDep (core.js:10854)
at NgModuleRef.get (core.js:12087)
at resolveDep (core.js:12577)
at resolvePromise (zone.js:809)
at resolvePromise (zone.js:775)
at eval (zone.js:858)
at ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4740)
at ZoneDelegate.invokeTask (zone.js:420)
at Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at
Hi
My version of angular is 5.2.6
ERROR TypeError: FB.init is not a function
at HTMLScriptElement.eval [as __zone_symbol__ON_PROPERTYload] (angular5-social-login.umd.js:307)
at HTMLScriptElement.wrapFn (zone.js:1166)
at ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4740)
at ZoneDelegate.invokeTask (zone.js:420)
at Zone.runTask (zone.js:188)
at ZoneTask.invokeTask [as invoke] (zone.js:496)
at invokeTask (zone.js:1517)
at HTMLScriptElement.globalZoneAwareCallback (zone.js:1543)
Same issue happens with angularx-social-login
i am leaning Angular 5 and trying to create functionality of Social Login,
so i have installed angular5-social-login library via npm and called that library in app,module.ts file.
At that time of calling to that library , it throws below error:
./node_modules/angular5-social-login/angular5-social-login.umd.js
Module not found: Error: Can't resolve 'rxjs/BehaviorSubject' in 'D:\angular_project\myangular5\node_modules\angular5-social-login'
can someone help me with this error
All values are still saved and I'm not asked to choose account after executing signout
Hi, How to the get account selecting popup every time user click on sign in with social button, currently its not possible to change google account as it connect automatically.
I'm using Google and Facebook login, it works fine on localhost, but after uploading on the server it shows an error.
"ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'signIn' of undefined
TypeError: Cannot read property 'signIn' of undefined"
Cuurently, LinkedIn Login is returning user's email as user's id, I have created a pull request #27 to fix that, please check it and commit it.
If we need page list and other info of user we need to pass a scope which add permission links in facebook auth page while login.
Solution :
We need to add more scope like below.
return new Promise(function (resolve, reject) {
FB.login(function (response) {
if (response.authResponse) {
var /** @type {?} */ accessToken_2 = FB.getAuthResponse()['accessToken'];
FB.api('/me?fields=name,email,picture', function (res) {
resolve(FacebookLoginProvider.drawUser(Object.assign({}, { token: accessToken_2 }, res)));
});
}
}, { scope: 'email,public_profile,manage_pages,pages_manage_instant_articles,pages_show_list,publish_pages,read_insights' });
});
Facebook login will still be successful even if password was not typed or Facebook OAauth popup was closed if the Facebook app is set with Force Web OAuth Reauthentication.
Let's say you integrated Facebook login to Angular and your Facebook account is already logged in from another browser tab, I required Force Web OAuth Reauthentication on my facebook app settings. Facebook login will still be successful even after I closed the pop up and did not type my password.
How to deal with this issue?
How to login with another account?
I have logged out, but when login again can not select account, so automatically login using the first account.
I am trying to get user value as await auth.authState.toPromise()
which is never returning, while subscribe works fine.
Login with Linkedin is not working, I am getting below error.
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'then' of undefined
TypeError: Cannot read property 'then' of undefined at Object.authorize (in.js:18)
at angular-6-social-login-v2.umd.js:571
Currently when we do authentication we only get limited information but linkedin provide factility to get more information.
How can we get those additional information.
https://developer.linkedin.com/docs/fields/basic-profile
Currently I only below fields
"firstName": "Frodo",
"headline": "2nd Generation Adventurer",
"id": "1R2RtA",
"lastName": "Baggins",
Hi Team,
I created new project and followed the steps which is mentioned on the npm page
but still I am getting below errors.
ERROR in ../node_modules/angular-6-social-login/auth.service.d.ts(1,28): error TS2307: Cannot find module 'rxjs'
What I tried :
any comment??
How can we extend this to use other social site authentication like LinkdIn
Hi,
First thanks for this great package!
I added both Google and Facebook logins.
With Google I'm able to sign in/out.
I can also sign in with Facebook but whenever I call the sign out service I get the following error:
Refused to display 'https://www.facebook.com/home.php' in a frame because it set 'X-Frame-Options' to 'deny'.
Has anyone encountered this and would know how to get the Facebook logout working?
Thanks,
Guillaume
Please provide demo for this.
Hi,
I am using ngx-cookie service. Upon reading the value from cookie in component constructor, I try to call
socialSignIn('linkedin') but get error :
Reference error : IN is not defined at line
LinkedinLoginProvider.prototype.signIn = function () {
var _this = this;
return new Promise(function (resolve, reject) {
IN.User.authorize(function () {
IN.API.Raw('/people/~:(id,first-name,last-name,email-address,picture-url)').result(function (res) {
resolve(_this.drawUser(res));
});
});
});
Not sure how IN will get initialized here. Please help as I am stuck at this.
Thanks,
Atul
Cannot customize the requested field from Facebook.
I would like to retrieve the birthday, gender and other fields but for now it seems that it's limited to name, email
In Chrome Console:
core.js:1427 ERROR Error: Uncaught (in promise): Error: StaticInjectorError[AuthServiceConfig]:
StaticInjectorError[AuthServiceConfig]:
NullInjectorError: No provider for AuthServiceConfig!
Error: StaticInjectorError[AuthServiceConfig]:
StaticInjectorError[AuthServiceConfig]:
NullInjectorError: No provider for AuthServiceConfig!
after following tutorial. You are added as a collaborator on the repo if you want to test example.
How can i add other permissions to my app ? in my project case it gives me this error
message - (#200) Requires either publish_actions permission, or manage_pages and publish_pages as an admin with sufficient administrative permission↵code - 200↵Relevant information for error recovery can be found on the Facebook Developers Document:↵ https://developers.facebook.com/docs/graph-api/using-graph-api/#errors↵
I think you need to add a function where the developer can add permission?
Did something like:
this.socialAuthService.authState.forEach(function (status) {
console.log(status);
if (status && status.email) {
console.log(status.email);
loggedIn = true;
}
});
in canActivate, but status is null even though I have logged in
export function getAuthServiceConfigs() {
let config = new AuthServiceConfig(
[
{
id: GoogleLoginProvider.PROVIDER_ID,
provider: new GoogleLoginProvider("476522047024-sdu9l9cav23g7cs6g2lhm4nc89h6boje.apps.googleusercontent.com")
}
];
);
return config;
}
code is completely fine but throwing error and not able to run properly can anyone give me solutiuon ?
When I am calling this function
this.socialAuthService.signIn(socialPlatformProvider).then(
(userData) => {
console.log(socialPlatform+" sign in data : " , userData);
// Now sign-in with userData
...
}
);
token_type
. I also want to have token_type
for login because I want to pass that to the server.Is there any way to get that? 🤔
Please help. Thank you.
Hello,
Thanks for your package.
But I can't install it, I get error : "npm.registry.fetch is not a function"
Do you have an idea to resolve it, please ?
Thank you.
Hi, thank you for such a nice util library. I need to dynamically create AuthServiceConfig by fetching app ids from backend. How can I do that ?
In app.module how can I provide settings as observable/promise ?
$ npm install --save angular5-social-login
npm WARN [email protected] requires a peer of @angular/common@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a
Angular CLI: 6.2.2
Node: 8.10.0
OS: win32 x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.8.2
@angular/cli 6.2.2
@ngtools/webpack 6.0.8
@schematics/angular 0.8.2
@schematics/update 0.8.2
rxjs 6.3.2
typescript 2.7.2
webpack 4.8.3
I am using angular 5.2.8.
I am not able to get the UI for the login buttons.
Do I need to create my own css to get the required UI or should I use some inbuilt css classes to reflect the proper UI of Facebook and Google login buttons?
when i login by using mobile number,my email is undefined. also i want to extra details like gender,mobile number how can i get those fields in response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.