Questions tagged [passport-github2]

15 questions
4
votes
1 answer

Passport Github strategy not working and throwing errors

The code below is getting mad at me. I don't see anything wrong with it. function User(profile){ console.log(profile) } passport.use( new GitHubStrategy({ clientID: "my_id", clientSecret: "secret", …
Dingus45191
  • 532
  • 1
  • 7
  • 19
3
votes
0 answers

Delete Github OAuth access token when user logged out of GitHub

I'm building a website which uses GitHub OAuth to authorise users. I'm successfully authorising users and able to get access_token from GitHub to talk to their API. When user logs out of my app I invalidate the session and delete the authorisation,…
Udaykiran R
  • 362
  • 2
  • 6
  • 16
2
votes
1 answer

Passport callback 500 server error

I have been struggling a lot trying to have passport working. I am using passport-github2, but while trying to troubleshoot the issue I tried passport-facebook and twitter as well, and none of them seem to work now. I had a simple application which…
1
vote
0 answers

Error: Request failed with status code 404 , Axios trying to fetch github user emails using passport-github2

const Raven = require('raven') const GithubStrategy = require('passport-github2').Strategy const axios = require('axios'); const models = require('../../../db/models').models const config = require('../../../../config') const secrets =…
1
vote
0 answers

How can I authenticate my localhost nodejs client by github enterprise (hosted in an ec2) using passport-github2?

I am trying to authenticate my nodejs client by the github enterprise. The nodejs client is in my own machine(localhost) and the github enterprise is hosted in an ec2 machine. The github enterprise has a self-signed SSL certificate for https. I have…
1
vote
0 answers

Trying to set up Github Passport2 Strategy with React/express

I'm not sure what I am doing wrong I've followed the documentation and it looks like I set up everything correctly but it just doesn't want to grant me the access token and redirect me! Do I need to redirect out of react-router to the auth/github…
ZachBach
  • 11
  • 1
1
vote
4 answers

[Passportjs][Angular5] No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access

I am trying to integrate Nodejs backend api with Angular. I have implemented passpor-google, passport-github, passport-twitter strategy on the backend application. My backend App url is http://localhost:3000 My Frontend App url is…
0
votes
1 answer

How to use passport.js github strategy to get emails of users instead of null

I successfully got the user details but the email field is null.After some time got to know that I need to fetch it from "https://api.github.com/user/emails".I used axios and also provided accesstoken as header but it is giving me…
0
votes
0 answers

How to config github oauth2 passport.js?

I use github oauth2 passport.js. After first time logged in my app auto logged in. I think this problem this prompt config. But it is not worked. Here my code: router.get('/auth/github', passport.authenticate('github',{ scope: [ 'user:email'…
0
votes
1 answer

passport-github2 returns null in email field

passport-github2 returns null in email field even when {scope: ['user:email']} was passed to passport.authenticate('github', {scope: ['user:email'] , session: false})(req, res, next)
lazycipher
  • 340
  • 3
  • 14
0
votes
1 answer

How to properly use passport-github for REST API authentication?

I am building a vue.js client which needs to be authenticated through github oauth using an express server. It's easy to do this using server side rendering but REST API has been troublesome for me. I have set the homepage url as…
0
votes
1 answer

Unable to get profile information in callback, But able to found that information in serializeUser function

I am trying to authenticate a user using passport-github strategy. It seems like everything working fine except I am unable to fetch profile information inside call back. But Able to get that information in serializeUser function. var…
0
votes
1 answer

Accessing hyperledger composer rest server access token from frontend client

I have a hyperledger composer network and rest server set up with github authentication(using passportjs). From the rest server I can successfully authenticate with github and get an access token that is in the local storage and displayed at the top…
söze
  • 500
  • 1
  • 3
  • 13
0
votes
1 answer

Maintaining oath callback URLs

I'm developing a Loopback-based NodeJS app that uses GitHub Passport auth. For my development, I use localhost in my callbackURL setting in providers.json, but I have to change it to the published URL every time I deploy. At the same time, I have to…
ulu
  • 5,872
  • 4
  • 42
  • 51
0
votes
1 answer

401 Authorization Required integrating Hyperledger Composer REST API from Webapp

Introduction I have a hyperledger env running in secure mode by following this link https://hyperledger.github.io/composer/integrating/enabling-rest-authentication.html and it works fine if I authenticate as specified in the document (hitting…