Giter Site home page Giter Site logo

sabyasachibiswal / angular5-social-login Goto Github PK

View Code? Open in Web Editor NEW
40.0 6.0 74.0 15 KB

Social authentication module for Angular 5. Includes Facebook and Google login with AOT compatibility.

TypeScript 47.82% JavaScript 52.18%
angular social-login facebook-login angular5 google-login angular-authentication angular-social-authentication ng5 social-authentication facebook-authentication

angular5-social-login's People

Contributors

marcoantoni0 avatar sabyasachibiswal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

angular5-social-login's Issues

popup_closed_by_user

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

Error: Can't resolve 'rxjs/BehaviorSubject'

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

No provider for AuthService!

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

FB.init is not a function

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

Error: Can't resolve 'rxjs/BehaviorSubject'

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

image

Cannot Change Google Accounts

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.

LinkedIn Login issue

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.

To add scope in request.

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 still set login as successful even if password was not typed for app with Force Web OAuth Reauthentication

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?

Login with another account

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.

Login with Linkedin is not working

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

Angular - Cannot find module 'rxjs'.

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 :

  1. remove node_modules and npm install - same error
  2. verify "moduleResolution": "node" in tsconfig.json

any comment??

Versions :
Node - v8.11.3
CLI - 7.2.3
image

Unable to sign out with Facebook

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

LinkedIn sign in issue while using cookie

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

No Provider for AuthServiceConfig

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.

Unable to give permission

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?

Having problems using this with a guard..

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

Declaration or statement expected.

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 ?

google sigin is not giving `token_type` in the response

When I am calling this function

this.socialAuthService.signIn(socialPlatformProvider).then(
      (userData) => {
        console.log(socialPlatform+" sign in data : " , userData);
        // Now sign-in with userData
        ...
            
      }
    );
  • its only giving token in the response not the 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.

npm.registry.fetch is not a function

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.

Dynamically get config (app IDs) from backend

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 ?

Incompatible with latest ng core

Error while installing

$ 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

My environment is as below (output of ng --v)

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

Package Version

@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

Facebook/Google login button UI not displaying

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?

email as undefined in my response

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.