Angular 7 Upgrade
See original GitHub issueHello,
After upgrade to Angular 7 I´m seeing a very strange behavior.
Before, the auth server was sending the REDIRECTURL#AccessToken=. When the app was loading, the access tokes was being removed from the URL and the login finalized. And I had the old URL back.
Now, after the login, My Url keeps this way Example: (replaced real information with ???)
http://localhost:4200/home#access_token=???&code=???&state=???&token_type=Bearer&expires_in=7199
Im using Implicit flow.
This is my configuration
this.oauthService.configure(authConfig.authenticationConfig);
this.oauthService.oidc = true;
this.oauthService.setStorage(localStorage);
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
console.log('before load');
this.oauthService.loadDiscoveryDocument().then(() => {
this.oauthService.tryLogin().then(() => {
console.log(this.oauthService.getAccessToken());
console.log(this.oauthService.getIdToken());
}
}
Look at Output console. I can see the library loading the access token with the “tryLogin”, but when I request using getAccessToken, it is null.
This is my routing config
{ path: 'home', component: HomeComponent },
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: '**', redirectTo: 'home' }
I Really appreciate any help in this case!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:21
Top Results From Across the Web
Angular Update Guide
Select the options that match your update · Angular versions · Application complexity · Other dependencies.
Read more >Keeping your Angular projects up-to-date
The Angular Update Guide provides customized update instructions, based on the current and target versions that you specify. It includes basic and advanced ......
Read more >Upgrade to Angular 7 — Within 10 Minutes - Jeroen Ouwehand
This quick post will tell you how you can upgrade your Angular 6 project within 10 minutes to the new Angular 7 (at...
Read more >How to upgrade Angular 7 to Angular 14 - YouTube
How to upgrade Angular 7 to Angular 13https://github.com/AmitXShukla/Visitor-Management-AppYoutube playlist ...
Read more >How to Upgrade Angular 7 to Angular 13 - Stack Overflow
You go step by step, as the documentation tells you. You can add a --force to the upgrade command. Then it will ignore...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @kzettlmeier, @prmces In your initial routing module add this to stop the url hash from being cleared before the idtoken is processed
RouterModule.forRoot(appRoutes, { initialNavigation: false }as ExtraOptions)
We are having the same type of issue after the Angular 7 upgrade. We are finding that the access token and id token are not getting stored and are returning null. We see the hash fragment in the URL and then it dissappears as if its getting pulled down and stored but afterward we are not able to grab. Previously we were using 4.0.3.