From 89dc4ea0a1aaecabe73c164a7f519b03e94c28d4 Mon Sep 17 00:00:00 2001 From: Lucas Kuratani Date: Sun, 23 Oct 2022 09:10:47 -0300 Subject: [PATCH] feat: add extraQueryParams to AuthProvider (#890) --- src/AuthContext.tsx | 2 ++ src/AuthContextInterface.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/AuthContext.tsx b/src/AuthContext.tsx index a2716f84..2501c30f 100644 --- a/src/AuthContext.tsx +++ b/src/AuthContext.tsx @@ -48,6 +48,7 @@ export const initUserManager = (props: AuthProviderProps): UserManager => { popupWindowFeatures, popupRedirectUri, popupWindowTarget, + extraQueryParams } = props; return new UserManager({ authority: authority || '', @@ -63,6 +64,7 @@ export const initUserManager = (props: AuthProviderProps): UserManager => { popup_redirect_uri: popupRedirectUri, popupWindowTarget: popupWindowTarget, automaticSilentRenew, + extraQueryParams }); }; diff --git a/src/AuthContextInterface.ts b/src/AuthContextInterface.ts index 45a7f38a..b68897c8 100644 --- a/src/AuthContextInterface.ts +++ b/src/AuthContextInterface.ts @@ -32,6 +32,10 @@ export interface AuthProviderProps { * The URL of the OIDC/OAuth2 provider. */ authority?: string; + /** + * Extra query params passed to the authorization url. + */ + extraQueryParams?: Record /** * Your client application's identifier as registered with the OIDC/OAuth2 provider. */