bertho-zero / react-redux-universal-hot-example

A starter boilerplate for a universal webapp using react, redux, express and feathers
https://react-hot-example.herokuapp.com/
MIT License
636 stars 171 forks source link

feathers-jwt after nginx proxy - cannot authenticate user. #460

Open ducnvhn opened 6 years ago

ducnvhn commented 6 years ago

hi @bertho-zero . I hope you are not too busy so you could have a minute to look into and help me with my problem. I have app setup like this: Client -> Nginx proxy -> Server(port3000) -> API (port 3030). and an redux action for example using feathers client:

export const makePost = data => ({
 types: [MAKE_POST, MAKE_POST_S, MAKE_POST_F],
 promise: ({ app }) => app.service('posts').create(data)
});
// feathers hook: 
import { associateCurrentUser } from 'feathers-authentication-hooks';
..
.
.
export const postHooks = {
 before: {
  create: [associateCurrentUser({ idField: '_id', as: 'user' }), ...]
 }
};

This hook work totally fine in computer browser. but it doesn't work on mobile browswers (Chrome/ FF...). I don't know if it was my setup or its a feathers hook / socket.io-client or browser bug? I also copy nginx conf from this repo but it does not work.

Can you have some advise please.

bertho-zero commented 6 years ago

Is it possible that this is related to this: https://stackoverflow.com/questions/22507555/socket-io-issue-only-on-mobile-devices ?