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

Token is undefined for authenticated user #500

Closed
knappdev opened this issue May 8, 2017 · 3 comments
Closed

Token is undefined for authenticated user #500

knappdev opened this issue May 8, 2017 · 3 comments

Comments

@knappdev
Copy link

knappdev commented May 8, 2017

Steps to reproduce

Configure the client:
export const restApp = feathers()
.configure(rest(host).superagent(superagent))
.configure(hooks())
.configure(authentication({
storage: AsyncStorage,
}))

Fetch access token using:
const token = restApp.get('accessToken');
(User is already authenticated in this case)

token undefined

But if fetched with some delay then the valid token will be returned

Expected behavior

Token should be available after configuring the feathers client

Actual behavior

Token is null

Module versions (especially the part that's not working):
"feathers": "^2.1.1",
"feathers-authentication-client": "^0.3.1",
"feathers-errors": "^2.7.1",
"feathers-hooks": "^2.0.1",
"feathers-rest": "^1.7.2",
"feathers-socketio": "^1.6.0",

React Native Version:
"react-native": "0.43.4",

@knappdev
Copy link
Author

knappdev commented May 8, 2017

Same issue in "react-native": "0.44.0"

@daffl
Copy link
Member

daffl commented May 9, 2017

@ekryski
Copy link
Member

ekryski commented Jul 24, 2017

@knappdev we use React Native a lot with Feathers and are able to authenticate and grab the access token no problem. Any chance you could kick up a simple reproducable example repo? It would make it much easier/faster for us to assess what is going on. 😄

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants