Log message #4171552

# At Username Text
# 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?
# Dec 29th 2018, 15:32 NickBusey Hmmm.. well the way I'm designing this is there is no `web` interface for them to login with, everything is done through the api
# Dec 29th 2018, 15:31 challgren but the user would login via web and then get their api key
# Dec 29th 2018, 15:31 challgren Yes it is
# Dec 29th 2018, 15:31 NickBusey hmm, I thought the api key was per user, hence why it says this in the comments ` //db field where the key is stored`
# Dec 29th 2018, 15:31 challgren Well the api key you would know before you “login”
# Dec 29th 2018, 15:30 k4t yes, they are working but they are throwing exception about missing view template which is normal...
# Dec 29th 2018, 15:30 NickBusey right.. I am, but this is on initial login. wouldn't I need to query the db to get the token first?
# Dec 29th 2018, 15:30 challgren https://github.com/CakeDC/auth/blob/master/Docs/Documentation/ApiKeyAuthenticate.md
# Dec 29th 2018, 15:30 challgren Use a token