@@ -133,6 +133,12 @@ const App: FunctionComponent = () => {
133
133
} )
134
134
) ;
135
135
136
+ const [ initialMatchSigninCallbackUrl ] = useState (
137
+ useMatch ( {
138
+ path : '/sign-in-callback' ,
139
+ } )
140
+ ) ;
141
+
136
142
const initialize : ( ) => Promise < UserManager > = useCallback ( ( ) => {
137
143
if ( process . env . REACT_APP_USE_AUTHENTICATION === 'true' ) {
138
144
return fetchAuthorizationCodeFlowFeatureFlag ( ) . then (
@@ -142,7 +148,8 @@ const App: FunctionComponent = () => {
142
148
initialMatchSilentRenewCallbackUrl != null ,
143
149
fetch ( 'idpSettings.json' ) ,
144
150
fetchValidateUser ,
145
- authorizationCodeFlowEnabled
151
+ authorizationCodeFlowEnabled ,
152
+ initialMatchSigninCallbackUrl != null
146
153
)
147
154
) ;
148
155
} else {
@@ -152,11 +159,16 @@ const App: FunctionComponent = () => {
152
159
( ) =>
153
160
new Promise ( ( resolve ) =>
154
161
window . setTimeout ( ( ) => resolve ( true ) , 500 )
155
- )
162
+ ) ,
163
+ initialMatchSigninCallbackUrl != null
156
164
) ;
157
165
}
158
166
// Note: initialMatchSilentRenewCallbackUrl and dispatch don't change
159
- } , [ initialMatchSilentRenewCallbackUrl , dispatch ] ) ;
167
+ } , [
168
+ initialMatchSilentRenewCallbackUrl ,
169
+ dispatch ,
170
+ initialMatchSigninCallbackUrl ,
171
+ ] ) ;
160
172
161
173
useEffect ( ( ) => {
162
174
initialize ( )
0 commit comments