question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Several issues with Angular 6 "Migration"

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
acegilzcommented, Jul 22, 2018

@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

0reactions
neroniakycommented, Jul 21, 2018

@acegilz I added an additional step for the migration tutorial, which explains the ‘login’ field.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 6 to 12 Migration Issues - Stack Overflow
1 Answer 1 ... Looks like the Processor can't make sense of the Object being passed to it. I just recently had something...
Read more >
The Issues I Faced When Upgrading The Angular Versions
Some versions of Angular might not work with latest version of typescript. You will need to downgrade typescript version in that case. Also...
Read more >
Common Issues and Questions • AngularJS Migration
In this lecture we will cover a few key troubleshooting issues and see how we can solve them during our migration from AngularJS...
Read more >
AngularJS to Angular upgrade: The most common migration ...
7 prevailing problems during AngularJS to Angular upgrade; Migration pitfall #1. Failure to create a hybrid app; Migration pitfall #2.
Read more >
Guide to update your Angular application v6.0 -> v12.0 for ...
Warning: Be sure to follow the guide below to migrate your application to the new version. You can't run ng update to update...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found