Skip to content

RegisterAccount not sending same data #462

@Grafexy

Description

@Grafexy

I'm submitting a...

  • Regression (a behavior that used to work and stopped working in a new release)
  • Bug report
  • Performance issue
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Current behavior

this.tokenService.registerAccount({
      first_name: user.first_name,
      last_name: user.last_name,
      login: user.email,
      password: <string>user.password,
      passwordConfirmation: <string>user.password_confirmation,
});

but it will send only

    const body = {
      [this.options.loginField]: registerData.login,
      password: registerData.password,
      password_confirmation: registerData.password_confirmation,
    };

https://github.com/neroniaky/angular-token/blob/master/projects/angular-token/src/lib/angular-token.service.ts#L153

Expected behavior

In token version 0.2.0 we would send whole data
https://github.com/neroniaky/angular-token/blob/v0.2.0/src/angular2-token.service.ts#L169

What is the motivation / use case for changing the behavior?

Devise token can receive more data then loginField, password and password_confirmation.
In our case User must have first name, and last name

Environment

Angular-Token version: 6.0.0
Angular version: 6.0.3

Bundler

  • Angular CLI (Webpack)
  • Webpack
  • SystemJS

Browser:

  • Chrome (desktop) version XX
  • Chrome (Android) version XX
  • Chrome (iOS) version XX
  • Firefox version XX
  • Safari (desktop) version XX
  • Safari (iOS) version XX
  • IE version XX
  • Edge version XX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions