Closed web265p3 closed 6 years ago
Problem fixed! This issue describes what was wrong. It was the adal version 1.0.17, that contained a bug.
@web265p3 with adal version 1.0.17 and Angular 6. Can you get accessToken correctly? How did you fix that? I only get IdToken and manually get accesstoken by another call.
For this issue I created a new Angular6-app with angular cli, that tries to call my backend API with a token retrieved from the oauth-endpoint.
My source code can be found here: https://github.com/web265p3/angular-adal-test/tree/master/src
I installed the latest version of adal-angular4 and configured everything like I found in the tutorials. I call my API with the following lines:
The prepare options, just adds the token:
But a URL with "authentication3" as suffix is never even called. Instead I can find a token, that is returned to my app via an HTTP 302 redirect.
The location header redirects me to localhost:4200 with a valid access token. But ADAL does neither take the token, nor calls my endpoint. It just happens nothong.
I enabled adal verbose logging and get the following output:
I am out of ideas, what might go wrong here. Why is ADAL just ignoring my call to the "authentication3" route. Any proposals?