You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current implementation of the angular-auth-oidc-client library automatically generates a codeVerifier within a private method createCodeVerifier, which is not accessible for customization. In my use case, the codeVerifier is provided externally by a backend service. Currently, there is no way to integrate this external codeVerifier due to the method's inaccessibility and lack of extensibility in the library's design.
Describe the solution you'd like
I propose to introduce a way to inject a custom codeVerifier generation strategy into the library. This could be achieved by allowing an externally defined function to be passed as a configuration option, which the library would then use instead of the private createCodeVerifier method. This function should be able to access the necessary context from the OpenIdConfiguration to maintain compatibility with different setups.
Describe alternatives you've considered
Injecting a custom generation strategy would provide the most flexibility and maintain the encapsulation and integrity of the library's architecture.
Additional context
Below is a conceptual example of how this could be implemented:
// Modification to use the injected generatorprivatecreateCodeVerifier(configuration: OpenIdConfiguration): string {constcodeVerifierGenerator=this.configService.getCodeVerifierGenerator();//This is the injectable serviceconstcodeVerifier=codeVerifierGenerator ? codeVerifierGenerator(configuration) : this.randomService.createRandom(67,configuration);this.storagePersistenceService.write('codeVerifier',codeVerifier,configuration);returncodeVerifier;}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The current implementation of the
angular-auth-oidc-client
library automatically generates acodeVerifier
within a private methodcreateCodeVerifier
, which is not accessible for customization. In my use case, thecodeVerifier
is provided externally by a backend service. Currently, there is no way to integrate this externalcodeVerifier
due to the method's inaccessibility and lack of extensibility in the library's design.Describe the solution you'd like
I propose to introduce a way to inject a custom
codeVerifier
generation strategy into the library. This could be achieved by allowing an externally defined function to be passed as a configuration option, which the library would then use instead of the privatecreateCodeVerifier
method. This function should be able to access the necessary context from theOpenIdConfiguration
to maintain compatibility with different setups.Describe alternatives you've considered
Injecting a custom generation strategy would provide the most flexibility and maintain the encapsulation and integrity of the library's architecture.
Additional context
Below is a conceptual example of how this could be implemented:
The text was updated successfully, but these errors were encountered: