Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: How can i send customParamsCodeRequest on a per authorize call basis #1640

Open
Niktron opened this issue Dec 20, 2022 · 0 comments
Labels

Comments

@Niktron
Copy link

Niktron commented Dec 20, 2022

What Version of the library are you using?
15.0.2

Question
Im looking for a way to dynamically send custom parameter to the /token endpoint with the authorize() method, but it seams that is is simply not possibly. Here is my code.

private callbackAuth(loginResponse: LoginResponse): void {
    if (loginResponse.isAuthenticated === false) {
      console.debug("User not authenticated", this.authenticated)
      this.oidcSecurityService.authorize(null, this.getExtraParams());
      return;
    }
}

private getExtraParams(redirectUrl?: string): AuthOptions {
    return {
      redirectUrl: redirectUrl,
      customParams: {
         ...
      }
    } as AuthOptions;
  }

The seconds parameter of the authorize() method only appends the customParams to the url, but i need to send them as form parameters on token exchange. Is there any way of doing this while staying inside lib restrictions?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant