heresy / angular2-social-login-example Goto Github PK
View Code? Open in Web Editor NEWangular2-social-login Example
angular2-social-login Example
npm start
[email protected] start /Users/phani/wtcprojects/angularapps/angular2-social-login-example-master
tsc && concurrently "npm run tsc:w" "npm run lite"
node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2693: 'Map' only refers to a type, but is being used as a value here.
node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2693: 'Set' only refers to a type, but is being used as a value here.
node_modules/@types/core-js/index.d.ts(39,27): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(47,36): error TS2304: Cannot find name 'Iterable'.
node_modules/@types/core-js/index.d.ts(226,38): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(231,35): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(236,37): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(349,33): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(350,31): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(351,34): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(352,34): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(353,34): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(354,34): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(355,61): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(356,60): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(357,65): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(357,97): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(358,60): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(359,58): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(360,59): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(361,58): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(362,61): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(362,117): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(363,42): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(365,81): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(366,78): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(367,76): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(368,73): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(431,6): error TS2304: Cannot find name 'Symbol'.
node_modules/@types/core-js/index.d.ts(431,26): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(464,59): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(465,59): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(466,42): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(467,48): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(468,69): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(472,40): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(474,48): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(494,55): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(495,45): error TS2304: Cannot find name 'PropertyKey'.
node_modules/@types/core-js/index.d.ts(511,46): error TS2304: Cannot find name 'Iterable'.
node_modules/@types/core-js/index.d.ts(512,43): error TS2304: Cannot find name 'Iterable'.
node_modules/@types/core-js/index.d.ts(535,42): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(536,39): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(537,41): error TS2304: Cannot find name 'IterableIterator'.
node_modules/@types/core-js/index.d.ts(623,16): error TS2304: Cannot find name 'MapConstructor'.
node_modules/@types/core-js/index.d.ts(624,16): error TS2304: Cannot find name 'SetConstructor'.
node_modules/@types/core-js/index.d.ts(625,20): error TS2304: Cannot find name 'WeakMapConstructor'.
node_modules/@types/core-js/index.d.ts(626,20): error TS2304: Cannot find name 'WeakSetConstructor'.
node_modules/@types/core-js/index.d.ts(627,20): error TS2304: Cannot find name 'PromiseConstructor'.
node_modules/@types/core-js/index.d.ts(642,32): error TS2304: Cannot find name 'Iterable'.
node_modules/@types/core-js/index.d.ts(646,39): error TS2304: Cannot find name 'Iterable'.
node_modules/@types/core-js/index.d.ts(646,53): error TS2304: Cannot find name 'Iterator'.
node_modules/@types/core-js/index.d.ts(1280,36): error TS2339: Property 'for' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1284,43): error TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1288,50): error TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1292,40): error TS2339: Property 'iterator' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1296,38): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1300,37): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1304,39): error TS2339: Property 'replace' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1308,38): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1312,39): error TS2339: Property 'species' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1316,37): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1320,43): error TS2339: Property 'toPrimitive' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1324,43): error TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(1328,43): error TS2339: Property 'unscopables' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2059,36): error TS2339: Property 'for' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2063,43): error TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2067,50): error TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2071,40): error TS2339: Property 'iterator' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2075,38): error TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2079,37): error TS2339: Property 'match' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2083,39): error TS2339: Property 'replace' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2087,38): error TS2339: Property 'search' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2091,39): error TS2339: Property 'species' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2095,37): error TS2339: Property 'split' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2099,43): error TS2339: Property 'toPrimitive' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2103,43): error TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'.
node_modules/@types/core-js/index.d.ts(2107,43): error TS2339: Property 'unscopables' does not exist on type 'SymbolConstructor'.
node_modules/rxjs/Observable.d.ts(68,60): error TS2693: 'Promise' only refers to a type, but is being used as a value here.
npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: tsc && concurrently "npm run tsc:w" "npm run lite"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-social-login-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc && concurrently "npm run tsc:w" "npm run lite"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-social-login-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-social-login-example
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/phani/wtcprojects/angularapps/angular2-social-login-example-master/npm-debug.log
When we login with linkedin then pop up is opening and showing message โuh oh!โ because client_id is not passing which we are assigning inside the provider . what will be the solution of this, would you please help me for this issue.
I using angular 4+
got this issue when page load
details:"Failed to read the 'localStorage' property from 'Window': Access is denied for this document."
error:"idpiframe_initialization_failed"
and when hit the login button
console log this error
error: "popup_closed_by_user"
test
Facebook Login produces a blank pop-up after login since Windows 10 updates.
Is not showing any error in the console.
I readed avbout this but i need that user can login witout change manualy the system settings.
Hi, this is not an error or bug, this issue is raised to get clarified.
I want know how to authorize the user will be allowed to access the protected routes.
In passport.js implementation. I can authenticate the user using
exports.googleAuthLogin = passport.authenticate('google', { failureRedirect: '/', });
but how to provide access or authenticate the user by using this front end module ?
ERROR TypeError: Cannot read property 'authorize' of undefined
at Observable._subscribe (auth.service.js:82)
at Observable.webpackJsonp.../../../../rxjs/Observable.js.Observable._trySubscribe (Observable.js:172)
at Observable.webpackJsonp.../../../../rxjs/Observable.js.Observable.subscribe (Observable.js:160)
at AppComponent.webpackJsonp.../../../../../src/app/app.component.ts.AppComponent.signIn (app.component.ts:16)
at Object.eval [as handleEvent] (AppComponent.html:18)
at handleEvent (core.es5.js:11998)
at callWithDebugContext (core.es5.js:13467)
at Object.debugHandleEvent [as handleEvent] (core.es5.js:13055)
at dispatchEvent (core.es5.js:8614)
at core.es5.js:9228
Hi
Is there a way to prevent the sign-in from loading in a new window/tab?
Thanks
How to get full profile information like location, first name, last name, email, birth date in linkedin
Hi,
could you expand the Google user data that is returned with these fields?
firstName: profile.getGivenName(),
lastName: profile.getFamilyName(),
Right now users first and last name are returned as one string which causes issues when trying to parse them and save to database as separate data.
It would be better if you will add twitter Login too along with existing functionality.
Hey,
Quick one for you. So I followed your instructions on how to implement this. Below is my set up:
login component html
<ul class="social-logins">
<li>
<button (click)="socialLogin('facebook')"><span class="icon-facebook"></span></button>
</li>
<li>
<button (click)="socialLogin('google')"><span class="icon-google-plus"></span></button>
</li>
<li>
<button (click)="socialLogin('linkedin')"><span class="icon-linkedin"></span></button>
</li>
</ul>
login component
socialLogin(provider: string) {
this.sub = this._auth.login(provider)
.subscribe (
(data) => {
console.log(data);
}
)
}
index.ts
import { Angular2SocialLoginModule } from "angular2-social-login";
let providers = {
"google": {
"clientId": ""
},
"linkedin": {
"clientId": ""
},
"facebook": {
"clientId": "",
"apiVersion": "v2.9"
}
};
@NgModule({
imports: [
Angular2SocialLoginModule,
I Get an error:
login.component.html:35 ERROR ReferenceError: FB is not defined
Where am I going wrong? Same for linked in and google logins. Google returns gapi is not defined and linked in "in" is not defined.
Hi,
first thanks for this great package. I was able to use it successfully for both Facebook and Google. I also have setup a linkedin application and setup as per your instructions.
However it falls over with the following description: Cannot read property 'authorize' of undefined
While debugging I found out that it seems to happen when calling the method login in the AuthService class. The IN.User is undefined and therefore the authorize method called fails.
I provided a screenshot for you:
Another, but rather minor problem was receiving and error when closing the popup dialog using the Google API.
Thanks again for this great package!
Refused to execute script from 'https://accounts.google.com/Logout' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
i was changed the code in the file
node_modules\angular2-social-login\src\angular2-social-login.module.ts
` const loadProvidersScripts: Object = {
google: (info: IProvider) => {
let d = document, gJs, ref: any = d.getElementsByTagName('script')[0];
gJs = d.createElement('script');
gJs.async = true;
gJs.src = "//apis.google.com/js/platform.js";
gJs.onload = function() {
gapi.load('auth2', function() {
gapi.auth2.init({
client_id: info["clientId"],
// scope: 'email'
scope: 'https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.profile.emails.read https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/youtubepartner-channel-audit https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly'
})
})
}
ref.parentNode.insertBefore(gJs, ref);
}`
but it didnt worked for me
Plz help me to sort this out
Hi, I'm doing a webapp in Angular2 and I'm using your plugin, and I followed the tutorial to make it work, and it does. But everytime my app compiles a error message appears at the terminal:
ERROR in Error encountered resolving symbol values statically. Calling function 'Angular2SocialLoginModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function.
I'm using angular-cli, so I don't have system.config.js, and the real problem comes when I run the build --aot command. It throws me the same Error and I cannot make it compile.
However it works with the JiT compilator, but it's slow.
How can I fix that Error in my module?
Thanks!
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.