Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

No cookie/sessionstorage/anything is stored following official oauth2 example from guide. #646

Closed
sustained opened this issue Mar 12, 2018 · 4 comments

Comments

@sustained
Copy link

sustained commented Mar 12, 2018

Steps to reproduce

I followed the instructions here from the official guide.

Expected behavior

Authentication should work.

Actual behavior

Everything seems to work and I am redirected to my app with a query parameter (code).

No cookie is ever stored on the client.

The console displays this after logging in:

We have not logged in with OAuth, yet.  This means there's no cookie storing the accessToken.  As a result, feathersClient.authenticate() failed.
index.html?code=...:94 Error: Could not find stored JWT and no authentication strategy was given
    at NotAuthenticated.ExtendableBuiltin (feathers.js:1891)

System configuration

Module versions (especially the part that's not working):

  "dependencies": {
    "@feathersjs/authentication": "^2.1.2",
    "@feathersjs/authentication-jwt": "^2.0.0",
    "@feathersjs/authentication-oauth2": "^1.0.3",
    "@feathersjs/configuration": "^1.0.2",
    "@feathersjs/errors": "^3.3.0",
    "@feathersjs/express": "^1.2.0",
    "@feathersjs/feathers": "^3.1.3",
    "@feathersjs/socketio": "^3.2.0",
    "compression": "^1.7.2",
    "cors": "^2.8.4",
    "feathers-nedb": "^3.0.0",
    "helmet": "^3.12.0",
    "nedb": "^1.8.0",
    "passport-github": "^1.1.0",
    "serve-favicon": "^2.4.5",
    "winston": "^3.0.0-rc2"
  }

NodeJS version:
v8.10.0
Operating System:
Fedora
Browser Version:
Chrome 64
React Native Version:
N/A
Module Loader:
???

@sustained
Copy link
Author

I tried using the latest versions of feathers-client and socket.io-client from unpkg.com to no avail.

@sustained
Copy link
Author

sustained commented Mar 12, 2018

Have been playing around some more.

With this config, I get sent to a page showing me JSON containing a token:

    "github": {
      "clientID": "...",
      "clientSecret": "...",
      "callbackURL": "http://localhost:3030/auth/github/callback"
    }

And with this config, I get sent to localhost:3030?success and I am still "not logged in":

    "github": {
      "clientID": "...",
      "clientSecret": "...",
      "callbackURL": "http://localhost:3030/auth/github/callback",
      "successRedirect": "http://localhost:3030/?success",
      "failureRedirect": "http://localhost:3030/?failure"
    }

There are way too many moving parts for me to figure out which part of all this is breaking, good luck!

@sustained sustained changed the title No cookie is stored following official auth example from guide. No cookie/sessionstorage/anything is stored following official oauth2 example from guide. Mar 12, 2018
@jraut
Copy link

jraut commented Apr 30, 2018

The guide starts with the words The Auk release (v2). You are using Buzzard (v3).

@daffl
Copy link
Member

daffl commented May 8, 2019

oAuth has been changed significantly in Feathers v4 authentication and does no loner use cookies to transmit the token.

Please see the migration guide for more information. Closing this issue in order to archive this repository. Related issues can be opened at the new code location in the Feathers main repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants