New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no callback from app.authenticate #1705
Comments
tried with this setup: |
Hi guys, I think this has to be related to AsyncStorage from react-native itself. Somehow, I able to get it work by below feathers setup: import io from 'socket.io-client';
import feathers from '@feathersjs/feathers';
import socketio from '@feathersjs/socketio-client';
import auth from '@feathersjs/authentication-client';
import { AsyncStorage } from "react-native"
const socket = io('http://192.168.0.148:3030/');
const app = feathers();
app.configure(socketio(socket));
app.configure(auth({ storage: AsyncStorage }));
export default app; |
Reopen because after authenticate successfully, hitting 'No auth token' Still looking for solution |
I am facing the same issue |
Please upgrade to the latest version and provide a complete example to reproduce if you are still facing the same issue. |
hi @daffl after updating to latest version: "@feathersjs/authentication-client": "^4.4.1",
"@feathersjs/feathers": "^4.4.1",
"@feathersjs/socketio-client": "^4.4.1",
"socket.io-client": "^2.3.0",
"react-native": "0.61.5",
"react": "16.9.0", Still not working Below is my feathers.js setup: import io from 'socket.io-client';
import feathers from '@feathersjs/feathers';
import socketio from '@feathersjs/socketio-client';
import auth from '@feathersjs/authentication-client';
import { AsyncStorage } from "react-native"
const socket = io('http://192.168.0.118:3030/');
const client = feathers();
client.configure(socketio(socket));
client.configure(auth({
storage: AsyncStorage,
}));
export default client; My App.js: client.authenticate({
strategy: 'facebook',
access_token: token
})
.then((res)=>{
return client.service('users').find()
})
.then((res)=>{
console.log({res})
})
.catch((err)=>{
console.log({err})
}) This still giving me the error "No auth token" By the way, I tried to use the returned token with axios, it works: client.authenticate({
strategy: 'facebook',
access_token: token
})
.then((res)=>{
return axios.get(`http://192.168.0.118:3030/users`,
{
headers:
{
'Authorization': res.accessToken
}
}
)
})
.then((res)=>{
console.log({res})//data returned from feathersjs server
})
.catch((err)=>{
console.log({err})
}) |
@daffl My current api package.json "@feathersjs/authentication": "^2.1.16",
"@feathersjs/authentication-jwt": "^2.0.10",
"@feathersjs/authentication-local": "^1.2.9",
"@feathersjs/authentication-oauth2": "^1.3.1",
"@feathersjs/cli": "^3.9.0",
"@feathersjs/configuration": "^2.0.6",
"@feathersjs/errors": "^3.3.6",
"@feathersjs/express": "^1.3.1",
"@feathersjs/feathers": "^3.3.1",
"@feathersjs/socketio": "^3.2.9",
"express": "^4.16.4",
"feathers-authentication": "^1.3.1",
"feathers-authentication-hooks": "^0.3.1",
"feathers-hooks-common": "^4.20.7",
"feathers-mongoose": "^6.3.0", |
Hi guys,
I encountered no callback from app.authenticate
npm setup:
feathers.js setup:
By the way, app.service('model').find() works fine.
Is there any thing I'm missing?
The text was updated successfully, but these errors were encountered: