Several issues with Angular 6 "Migration"
See original GitHub issueI followed this tutorial to upgrade to angular-token: https://github.com/neroniaky/angular2-token/wiki/Migrate-to-Angular-Token-6.0
However, I verify that there are missing steps and also the integration is not that “smooth”.
Let me point out some issues Im facing:
- Login and Register interface changed from “email” to “login”, I was forced to make the following change and also similar on registration component to keep things working
this.signInUser =
{
//email: this.email.value,
login: this.email.value,
password: this.password.value
}
-
The signin remains making successful calls with backend because it doesn’t change: example request
{"email":"xxxx","password":"yyyy"}
, however as stated on the previous step, I was forced to change email from login somehow it still sends the request with email, really weird… -
Another inconsistency with regular devise-token backend on the registration. Contrary with login that still sends the email, the register does not work because no email field is sent:
Example request:
{"login":"dadsa@fad.da","password":"123456","password_confirmation":"123456","confirm_success_url":"http://localhost:4200/home"}
Response:
//422 Unprocessable Entity
"errors": {
"email": [
"can't be blank"
],
"full_messages": [
"Email can't be blank"
]
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@arjenbrandenburgh thanks for the clarification. In fact I don’t need to check the status that way, I just saw it many times, including on templates and also several tutorials and the truth is that it worked there (registration module) until I updated this package to the new version and angular to 6 from 4, so I don’t know why exactly it stopped working but no problem because the
res
already passes the success responses…Regarding your lasts post it was a great help to put things working… Everything is fine now 👍 thanks
@neroniaky Great step, thanks and keep going with the wonderful work guys
@acegilz I added an additional step for the migration tutorial, which explains the ‘login’ field.