jaredhanson / jaredhanson/passport

Allow providing accessTokens directly

Open
#76 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
23.5k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

It's possible to get access tokens from oauth providers through their javascript APIs. Because getting access tokens this way does not require browser redirects you can create an inline login screen by making the API call on the client, then passing the response to your server through an ajax call.

It's possible to get it to work with passport as is by replicating some of the authentication code in the request that provides the accessToken but it requires copying and pasting large chunks of anonymous functions. If passport provided a way to accept an accessToken directly it could be done much more cleanly.

Contributor guide

Open the contributing guide

Research direction

No implementation files or tests are named in the issue. Start by tracing Passport’s existing authentication request flow and the code that handles access tokens obtained through redirects; compare that path with the described client-side token handoff. Done means an inline login can pass an access token to the server through a supported entry point without copying authentication logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.