I follow this guide -> https://www.npmjs.com/package/passport-github And my implementation is: import { Component, OnInit, Input } from '@angular/core'; import { passport } from 'passport'; import { Strategy } from 'passport-github';
@Component({ selector: 'app-Callback', templateUrl: './Callback.component.html', styleUrls: ['./Callback.component.css'] }) export class CallbackComponent implements OnInit { constructor(){} getAuth(){ passport.authenticate('github'); } ngOnInit(): void { var GitHubStrategy = Strategy.Strategy; passport.use(new GitHubStrategy({ clientID: "56e8d8ca33270722d3b0", clientSecret: "73934a7c16258220808d4b9e22abd379d0c25cc3", callbackURL: 'http://localhost:4200/login/github/callback' }, function(accessToken, refreshToken, profile, cb) { return cb(null, profile); } )); // passport.serializeUser(function(user, cb) { // cb(null, user); // }); // passport.deserializeUser(function(obj, cb) { // cb(null, obj); // }); this.getAuth(); } } <https://lh3.googleusercontent.com/-uQiH0uS5MTk/Wf2Dv_7gCZI/AAAAAAAAANw/LMVbqlUjMP8x4AfJy39xiK7fv9OjlqTKwCLcBGAs/s1600/Untitled.png> < - Error суббота, 4 ноября 2017 г., 11:03:52 UTC+3 пользователь Sander Elias написал: > > Hi Eugene > > What is your issue? AKAIK there is nothing Angular specific in that flow. > Follow the passport sample, and then implement that in your app. If there > is something specific to angular, don't hesitate and ask us! Preferably > with a running sample. > > Regards > Sander > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.