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

Implement account.signUp with profile: {...} option #11

Open
gr2m opened this issue Nov 20, 2015 · 1 comment · May be fixed by #98
Open

Implement account.signUp with profile: {...} option #11

gr2m opened this issue Nov 20, 2015 · 1 comment · May be fixed by #98

Comments

@gr2m
Copy link
Member

gr2m commented Nov 20, 2015

Currently, a user can not sign up and pass profile properties. This will fail

account.signUp({
  username: 'pat',
  password: 'secret',
  profile: {
    fullname: 'Dr Pat Hook'
  }
})

The reason is that JSON API currently does not allow for multiple actions in a single request

So we need to send a separate request to PATCH /session/account/profile
As signUp (creating account) is separated from signIn (creating session), we can't send a Authorization: Bearer ... token. I would suggest we allow to authenticate traditionally with Authoriziation: Basic ... as well, so we would send headers.authorization = 'Basic ' + base64encode('pat:secret')

Authentication with Basic ... and also Token ... will be required for the admin client, too: https://github.com/hoodiehq/hoodie-client-account/tree/master/admin

seanjohnite pushed a commit to seanjohnite/hoodie-client-account that referenced this issue Mar 18, 2016
@jameswestnz jameswestnz linked a pull request Jun 15, 2016 that will close this issue
3 tasks
@ChangJoo-Park
Copy link

👍

@pmbanugo pmbanugo self-assigned this Aug 1, 2017
@pmbanugo pmbanugo removed their assignment Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants