diff --git a/pubspec.yaml b/pubspec.yaml index 4d5fa17dd9..c55b8b0d45 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -44,7 +44,7 @@ dependencies: flutter_secure_storage: ^7.0.1 flutter_svg: ^0.22.0 flutter_typeahead: ^5.0.0 - flutter_web_auth_2: ^3.0.2 + flutter_web_auth_2: ^3.1.1 # flutter_webrtc: # Until https://github.com/flutter-webrtc/flutter-webrtc/issues/1212 is fixed # git: https://github.com/radzio-it/flutter-webrtc.git flutter_webrtc: ^0.9.31 diff --git a/web/auth.html b/web/auth.html index f1d2fc0bca..59a263b58d 100644 --- a/web/auth.html +++ b/web/auth.html @@ -1,14 +1,22 @@ -
-Authentication is complete. If this does not happen automatically, please - close the window. - - + }; + + if (window.opener) { + window.opener.postMessage(message, window.location.origin); + window.close(); + } else if (window.parent && window.parent !== window) { + window.parent.postMessage(message, window.location.origin); + } else { + localStorage.setItem('flutter-web-auth-2', window.location.href); + window.close(); + } + } + + postAuthenticationMessage(); + \ No newline at end of file