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

feat: add extraQueryParams to AuthProvider #890

Merged
merged 1 commit into from
Oct 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const initUserManager = (props: AuthProviderProps): UserManager => {
popupWindowFeatures,
popupRedirectUri,
popupWindowTarget,
extraQueryParams
} = props;
return new UserManager({
authority: authority || '',
Expand All @@ -63,6 +64,7 @@ export const initUserManager = (props: AuthProviderProps): UserManager => {
popup_redirect_uri: popupRedirectUri,
popupWindowTarget: popupWindowTarget,
automaticSilentRenew,
extraQueryParams
});
};

Expand Down
4 changes: 4 additions & 0 deletions src/AuthContextInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>
/**
* Your client application's identifier as registered with the OIDC/OAuth2 provider.
*/
Expand Down