Angular-auth-oidc-client: Migration docs are incorrect when loading config from HTTP endpoint

Created on 4 May 2020  路  1Comment  路  Source: damienbod/angular-auth-oidc-client

Hello,

I was migrating from a previous version of angular-auth-oidc-client (10.0.15) to the latest (11.0.0) following the migration guide and I noticed the following:

The migration guide does not specify that when loading config from a HTTP endpoint, the method should return a promise:

https://github.com/damienbod/angular-auth-oidc-client/blob/67a3681bc518d6c31c90263d548b41aed0edfde8/docs/migration.md#L205

In the samples, we can see how this is correct and working:

https://github.com/damienbod/angular-auth-oidc-client/blob/0979cdbcc56bee8f894bbb78c9e208adbd8e66f7/projects/sample-code-flow-http-config/src/app/app.module.ts#L34

I was attempting to make it work without returning a promise and I couldn't...

I think migration docs should be updated to reflect this.

docs bug

Most helpful comment

Hey @piraces , thanks for that hint, nice catch. Yes, the toPromise() was missing. Just as a side note: If you are using it without using http in front you can use the withConfig directly as it returns a promise already.

>All comments

Hey @piraces , thanks for that hint, nice catch. Yes, the toPromise() was missing. Just as a side note: If you are using it without using http in front you can use the withConfig directly as it returns a promise already.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haidelber picture haidelber  路  3Comments

yelhouti picture yelhouti  路  4Comments

toddtsic picture toddtsic  路  4Comments

jhossy picture jhossy  路  4Comments

vicver82 picture vicver82  路  4Comments