Log message #4171561

# At Username Text
# Dec 29th 2018, 15:50 challgren Well with the different ports that is causing your auth issues
# Dec 29th 2018, 15:50 Martin` but that is not possible with remember I quess?
# Dec 29th 2018, 15:50 NickBusey Well react isn't really the issue here, native apps would need the same functionality
# Dec 29th 2018, 15:49 NickBusey Martin`: Sure, just add a bit in the error handler of the api request, to load specifically from the cache what you saved on the last successful request
# Dec 29th 2018, 15:49 Martin` I'm using Cache::remember for that
# Dec 29th 2018, 15:49 challgren Id keep asking around Im not an expert with the crud plugin and react
# Dec 29th 2018, 15:48 Martin` I'm using the cache for reading data from external api's so it is not needed every request, but it is possible to fall back to cache when api request fails?
# Dec 29th 2018, 15:47 NickBusey Well, sounds like Cake won't be able to do what I need it to, or at least the User plugin. Ah well, the search is on for another back end I suppose. Thanks for the help!
# Dec 29th 2018, 15:44 NickBusey https://gitlab.com/NickBusey/mashio
# Dec 29th 2018, 15:44 challgren Serving it from the webapp folder allows you to use cookies
# Dec 29th 2018, 15:44 NickBusey And that looks almost identical to my setup
# Dec 29th 2018, 15:44 challgren nm thats some old code
# Dec 29th 2018, 15:44 NickBusey I'm more than open to suggestions on simplicity, but it seems like the only thing to do would be to serve the SPA from cake's webapp folder, which I may do, but doesn't really buy much during development
# Dec 29th 2018, 15:43 challgren You look at https://github.com/Rubyan/CakePHP-react
# Dec 29th 2018, 15:42 NickBusey The SPA server is not able to store cake goodies in the DB, the cake server is not able to serve the SPA app properly
# Dec 29th 2018, 15:42 NickBusey You are more than welcome to your opinion :) This is a fairly common setup
# Dec 29th 2018, 15:41 challgren Running 2 servers to accomplish really the same thing
# Dec 29th 2018, 15:41 challgren Seems a bit overkill
# Dec 29th 2018, 15:40 NickBusey so no, not really
# Dec 29th 2018, 15:40 NickBusey same site? not sure what you're asking exactly, they run on different ports if that's what you mean
# Dec 29th 2018, 15:40 NickBusey I'm using that to talk to cake
# Dec 29th 2018, 15:39 NickBusey https://preview.pro.ant.design/dashboard/analysis
# Dec 29th 2018, 15:39 challgren Is your react spa on the same site?
# Dec 29th 2018, 15:39 challgren it asks for an API key
# Dec 29th 2018, 15:39 challgren I was saying more look at the login on android
# Dec 29th 2018, 15:39 NickBusey I have no idea how android code works, no idea where to even start looking in that repo
# Dec 29th 2018, 15:37 NickBusey I really don't want to dump people back onto a cake app just to login and registor
# Dec 29th 2018, 15:37 NickBusey I am developing a responsive site, a React SPA
# Dec 29th 2018, 15:37 challgren Personally I would just develop a responsive site and use the API for native apps
# Dec 29th 2018, 15:35 challgren Check out how https://gitlab.com/Commit451/LabCoat does it on Android
# Dec 29th 2018, 15:34 NickBusey there could be a mobile app, a desktop app, a react web app, etc etc
# Dec 29th 2018, 15:34 challgren Seems overkill building native apps for each platform
# Dec 29th 2018, 15:34 challgren So you would have a app on the computer too?
# Dec 29th 2018, 15:34 NickBusey ok, that works one time, on one device. say they go over to computer 2 and want to login
# Dec 29th 2018, 15:34 birdy247 @dereuromark point taken
# Dec 29th 2018, 15:33 challgren that require Auth
# Dec 29th 2018, 15:33 challgren And use that on further calls
# Dec 29th 2018, 15:33 challgren Well when they register return the api key that you generate
# Dec 29th 2018, 15:33 NickBusey That kinda seems like the point of an API ;)
# Dec 29th 2018, 15:33 NickBusey They are going to register through the API too
# Dec 29th 2018, 15:33 challgren So how does the user register then? Or do you provide the login credentials?