File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,13 @@ class SigninPage extends React.Component<SigninPageProps, SigninPageState> {
5757 const isValidRelative = isValidRelativeUrl ( next ) ;
5858 const requestedByWhitelabelProvider = getWhitelabelProviderFromRedirectionUrl ( next as string ) ;
5959 email = typeof email === 'string' && decodeURIComponent ( email ) ;
60+ const userAgent =
61+ req && typeof req [ 'get' ] === 'function' ? ( req as any ) . get ( 'User-Agent' ) : req ?. headers ?. [ 'user-agent' ] ;
6062 return {
6163 token,
6264 next : next && ( isValidRelative || isTrustedRedirection ) ? next : null ,
6365 form : form || 'signin' ,
64- isSuspiciousUserAgent : isSuspiciousUserAgent ( ( req as any ) ?. get ( 'User-Agent' ) ) ,
66+ isSuspiciousUserAgent : isSuspiciousUserAgent ( userAgent ) ,
6567 email : email && isEmail ( email ) ? email : null ,
6668 untrustedDomainRedirection : ! isValidRelative && ! isTrustedRedirection ? next : null ,
6769 requestedByWhitelabelProvider,
You can’t perform that action at this time.
0 commit comments