Skip to content

Commit

Permalink
fix: Web SSO
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Dec 8, 2023
1 parent 73038ad commit f903d54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dependencies:
flutter_ringtone_player: ^4.0.0+2
flutter_secure_storage: ^9.0.0
flutter_typeahead: ^4.8.0
flutter_web_auth_2: ^3.0.3
flutter_web_auth_2: ^3.0.4
flutter_webrtc: ^0.9.46
future_loading_dialog: ^0.3.0
geolocator: ^7.6.2
Expand Down
19 changes: 9 additions & 10 deletions web/auth.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<!DOCTYPE html>
<head>
<title>Authentication complete</title>
</head>
<body>
<p>Authentication is complete. If this does not happen automatically, please
close the window.
<script>
<title>Authentication complete</title>
<p>Authentication is complete. If this does not happen automatically, please close the window.</p>
<script>
if (window.opener) {
window.opener.postMessage({
'flutter-web-auth-2': window.location.href
}, window.location.origin);
window.close();
</script>
</body>
} else {
localStorage.setItem('flutter-web-auth-2', window.location.href);
}
window.close();
</script>

0 comments on commit f903d54

Please sign in to comment.