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.

Export HashHandler Token

See original GitHub issue

Is your feature request related to a problem? Please describe. Yes.

We have a scenario where we have to run multiple instances of OAuthService side-by-side. For this, we need to override some of the dependencies of the OAuthService. As far as I am aware there is no way to specify a provider with deps without suppling the full list of constructor arguments.

This brings me to my problem. OAuthService has the crypto parameter of type HashHandler (even though it’s declared as @Optional() but we need it for PKCE code flow). However, this type is not exported by the module (see https://github.com/manfredsteyer/angular-oauth2-oidc/blob/master/projects/lib/src/public_api.ts#L3). But I couldn’t find why. The commit message which changed that just says fixed issues after merging. Even though the previous commit explicitly added the CryptoHandler to the public API (probably for similar reasons?).

Describe the solution you’d like Please export the HashHandler in the public api so that it can be re-used for the use case above.

Describe alternatives you’ve considered It would be sufficient to have an InjectionToken for it, if the class itself shouldn’t be exported for whatever reason.

I am happy to hand in the MR but I believe there was a reason that this line was commented out from public-api.ts

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Coksnusscommented, Jul 11, 2020

Have you found a workaround for this @Coksnuss ? I’m currently facing the exact same problem.

@niklr My current workaround is to keep a 1:1 file copy of the hash-handler.ts file inside my library and use it instead of the one bundled with angular-oauth2-oidc. Not really happy with that, but for now I don’t know what else to do.

I’ll probably just open a merge request within the next days which reverts that change.

1reaction
jeroenheijmanscommented, Jun 4, 2020

Fair nuff!

Just labels for organizing stuff anyhow 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

HashHandler - angular-oauth2-oidc
Abstract calcHash. calcHash(valueToHash: string, algorithm: string). Defined in projects/lib/src/token-validation/hash-handler.ts:12. Parameters : ...
Read more >
Export Users with Tokens - RSA Community - 629963
Export Users with Tokens Export Users with Tokens Use the Security Console to export users with tokens from a deployment. The records can...
Read more >
ace.js - Apple Open Source
onResize); }); el.env = editor.env = env; return editor; }; exports. ... getTokens(row); var token, c = 0; if (column == null) {...
Read more >
token-validation/hash-handler BUG - Bountysource
... import { DefaultHashHandler } from 'angular-oauth2-oidc/token-validation/hash-handler'; @Injectable({ providedIn: 'root' }) export class ...
Read more >
Unlock your frontend skills - Loris Leiva
csrfToken, forceTLS: true, namespace: '', }) export default { subscribe (channel, ... we receive a 419 status code due to the expiration of...
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