File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,9 @@ const App = () => (
182182render (< App / > , document .getElementById (' root' ));
183183```
184184
185+ > [ !WARNING]
186+ > If you have both ` redirect_uri ` and ` silent_redirect_uri ` configured, their value must be different.
187+
185188``` javascript
186189const configuration = {
187190 loadingComponent: ReactComponent, // you can inject your own loading component
Original file line number Diff line number Diff line change @@ -102,6 +102,12 @@ export const OidcProvider: FC<PropsWithChildren<OidcProviderProps>> = ({
102102 getFetch = null ,
103103 location = null ,
104104} ) => {
105+ if ( configuration && configuration . redirect_uri && configuration . silent_redirect_uri ) {
106+ if ( configuration . redirect_uri === configuration . silent_redirect_uri ) {
107+ throw new Error ( 'redirect_uri and silent_redirect_uri must be different' ) ;
108+ }
109+ }
110+
105111 const getOidc = ( configurationName = 'default' ) => {
106112 return OidcClient . getOrCreate ( getFetch ?? getFetchDefault , location ?? new OidcLocation ( ) ) (
107113 configuration ,
You can’t perform that action at this time.
0 commit comments