passport.js

Node.js passport-saml redirects to localhost:3000/login/callback all the time

痴心易碎 提交于 2020-01-05 20:23:09
问题 I am using the tutorial from www.npmjs.org/package/passport-saml for the SAML. I am a beginner in SAML. The tutorial says The SAML identity provider will redirect you to the URL provided by the path configuration I already have a OpenIdp account. It seems I can successfully login but the redirect URL always sends me to localhost:3000/login/callback which is not present in my code because I changed the 'path' to '/users/login-user-db-saml' or 'www.passporttoken.com:1234/users/login-user-db

Node.js passport-saml redirects to localhost:3000/login/callback all the time

孤街醉人 提交于 2020-01-05 20:20:41
问题 I am using the tutorial from www.npmjs.org/package/passport-saml for the SAML. I am a beginner in SAML. The tutorial says The SAML identity provider will redirect you to the URL provided by the path configuration I already have a OpenIdp account. It seems I can successfully login but the redirect URL always sends me to localhost:3000/login/callback which is not present in my code because I changed the 'path' to '/users/login-user-db-saml' or 'www.passporttoken.com:1234/users/login-user-db

Need help on how to actually use Passport authentication strategy in Express

别等时光非礼了梦想. 提交于 2020-01-05 15:17:15
问题 Suppose I have a script like this, which uses a Passport authentication strategy with an Express backend. How would I use this script to actually make API function calls? I don't see any explicit examples in the linked project's documentation nor can I find anything in Passport.js's documentation. Thanks. 回答1: I'm supposing that you know how to use passport, and you will figure it out what's the right Fitbit API endpoint (honestly, I'm don't know it). Said that, let me give an idea that might

Passport.js & Facebook Graph API

依然范特西╮ 提交于 2020-01-05 10:03:09
问题 I have some issue with Passport.js and Facebook Graph API 2.0. I cannot get my own friend list (returning empty array, but working fine if I requesting my own feed) if using the access token that I got from Passport but it is working fine if I copy the access token that I got from the Facebook graph explorer. Anyone have experience this issue? I need your help. So, here is some of my code: the routes and scope: app.get('/auth/facebook', passport.authenticate('facebook', { scope: ['user

Angular 2 proper use of authentication service

旧巷老猫 提交于 2020-01-05 04:59:19
问题 I am building web application using NodeJS for the server-side and Angular 2 for the client-side. In the application I'm using ADFS to authenticate users. The user browses to the website and automatically redirected to the ADFS authentication server. After the user completes the authentication, he redirects back to my application and I get the user data from the ADFS server. I used passport-saml package to implement the authentication and it works fine. The user is now stored at req.user .

How to use Facebook Graph API after authenticating with Passport.js facebook strategy?

那年仲夏 提交于 2020-01-05 04:22:08
问题 I've authenticated my user with the Facebook strategy and obtained their user info. My application now needs to hit other graph api endpoints on Facebook. I don't see a way to access a tool to send requests to the Facebook graph api. Upon inspecting the Strategy a little further, I see everything is built around the OAuth 2 strategy. 1) How do I use the facebook strategy to call other graph api endpoints? 2) Am I supposed to drill into the passport api somewhere to access a related oauth

Passport Facebook integration with angular-fullstack app not saving user session in angular-fullstack structure

£可爱£侵袭症+ 提交于 2020-01-04 09:02:44
问题 I have an angular-fullstack app generated from here - https://github.com/angular-fullstack/generator-angular-fullstack I am using the same directory structure as angular-fullstack. Now I am trying to authenticate users with facebook sdk and did the following steps - 1) specify passport facebook login strategy // created auth/facebook/index.js 'use strict'; var express = require('express'); var passport = require('passport'); var auth = require('../auth.service'); var router = express.Router()

node.js - Passport not persisting across browser requests, works with Postman

倖福魔咒の 提交于 2020-01-03 03:38:06
问题 I am currently using the create-react-app boiler plate and have been attempting to add auth. I am using axios as my promise based HTTP libray with React.js. I have been using node with express, express-session, passport and passport-local on the backend. Here is my server.js file with some exlusions: const express = require('express'); const mysql = require('mysql'); const app = express(); const cors = require('cors'); const session = require('express-session'); const passport = require(

Local and Google strategy in passport.js: issue when serializing user

巧了我就是萌 提交于 2020-01-03 02:47:13
问题 I've been trying to understand why I couldn't keep an user logged in once authenticated even though authentication itself was working. I even posted a question here: Passport.js - Local strategy doesn't authenticate By trying to fix the issue, I finally worked out what's wrong. The issue is the following: I have two different passport strategy, so I am serializing and deserializing the user twice. If I serialize the user with the local strategy first, local strategy will work, but Google's

Purpose of serializing/deserializing users into a session when using PassportJS?

别来无恙 提交于 2020-01-02 10:20:32
问题 What is the purpose of serializing/deserializing users into the session when using PassportJS? I worked with JSP before and there seems to be no notion of these things. 回答1: It controls how the user instance gets saved to your session store (such as connect-redis). I'm no expert on JSP, but I imagine there's some sort of ISerializable interface that classes must implement, which would be a rough equivalent. 来源: https://stackoverflow.com/questions/18640117/purpose-of-serializing-deserializing