If you call the web authentication login method too fast after app is brought to the foreground, the login fails with the following error:
`WebAuthenticationException (OTHER: An unexpected error occurred. CAUSE: Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=3 "The UIWindowScene for the returned window was not in the foreground active state." UserInfo={NSDebugDescription=The UIWindowScene for the returned window was not in the foreground active state.})
[K] #0 MethodChannelAuth0FlutterWebAuth.invokeRequest (package:auth0_flutter_platform_interface/src/method_channel_auth0_flutter_web_auth.dart:45:7)
#1 MethodChannelAuth0FlutterWebAuth.login (package:auth0_flutter_platform_interface/src/method_channel_auth0_flutter_web_auth.dart:21:9)
#2 WebAuthentication.login (package:auth0_flutter/src/mobile/web_authentication.dart:89:25)
#3 AuthService.acceptInvite (package:knowby_pro/features/auth/state/auth_service.dart:368:27)
`
We are only able to get around this by adding a fake delay before calling the login method.
### Reproduction
1. Create a new flutter route in the example which calls web auth login as soon as the route loads
2. Deeplink to that route when app is in the background (iOS)
### Additional context
_No response_
### auth0_flutter version
1.7.2
### Flutter version
3.22.0
### Platform
iOS
### Platform version(s)
iOS 17.5
Checklist
Description
If you call the web authentication login method too fast after app is brought to the foreground, the login fails with the following error:
`WebAuthenticationException (OTHER: An unexpected error occurred. CAUSE: Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=3 "The UIWindowScene for the returned window was not in the foreground active state." UserInfo={NSDebugDescription=The UIWindowScene for the returned window was not in the foreground active state.}) [K] #0 MethodChannelAuth0FlutterWebAuth.invokeRequest (package:auth0_flutter_platform_interface/src/method_channel_auth0_flutter_web_auth.dart:45:7)