Skip to content
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

User sign up api #6

Merged
merged 8 commits into from
Feb 8, 2015
Merged

User sign up api #6

merged 8 commits into from
Feb 8, 2015

Conversation

seansu4you87
Copy link
Contributor

Basic code for user sign up. The model is HEAVILY simplified right now. I'm waiting on flow diagrams/more context to figure out what exactly the columns and whatnot need to be.

seansu4you87 and others added 8 commits February 8, 2015 13:44
- Just wanted to see if the database is hooked up properly.  With the
  ssh requirements on the COA001 box, I couldn't figure out how to get a
  proper tunnel in to connect.  Made my own postgres box for now, and am
  connecting to that instead
- Simple migration (need to add a lot more fields for later)
- User model (Bookshelf based)
- User test (Mocha) that tests saving, for sanity check
- Database helper to kill test pollution on the database (truncates
  before each example and after all tests)
- Test helper to deal with Promise based testing
- Also added in good logging, seems to be highly recommended.  Only has
  logs to the console right now though, will figure out some kind of
  file logging and log rotation system later
- I'm using a DCI inspired pattern.  CreatingUser is basically a domain
  level object, to separate server concerns from the actual object model
- Using Joi for validation
- Had to add in chai-as-promised and create a wrapper method for Hapi
  server injection in order to test routes with a Promise interface
seansu4you87 added a commit that referenced this pull request Feb 8, 2015
@seansu4you87 seansu4you87 merged commit 0b50c1a into master Feb 8, 2015
@seansu4you87 seansu4you87 deleted the seansu4you87/user-signup branch February 8, 2015 23:46
@d-g-h
Copy link
Contributor

d-g-h commented Feb 10, 2015

@seansu4you87 I'm using JWT on another project (cookie storage, but I want local storage) Do you have plans for that? I don't think we mentioned this JWT detail.

@seansu4you87
Copy link
Contributor Author

There's a hapi auth plugin for that. This is for authentication right (not sure what you mean by local storage here)

@d-g-h
Copy link
Contributor

d-g-h commented Feb 10, 2015

The frontend needs to store the JWT somewhere to call the API. This token can be stored in a cookie, localStorage, or windowStorage

https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API

@seansu4you87
Copy link
Contributor Author

Oh got it, localStorage on the browser. I thought you were talking about
the API
On Tue, Feb 10, 2015 at 10:08 AM Dave Hall notifications@github.com wrote:

The frontend needs to store the JWT somewhere to call the API. This token
can be stored in a cookie, localStorage, or windowStorage


Reply to this email directly or view it on GitHub
#6 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants