You've already forked flutter-rp-example
added support for web ; bumped dart_core_sdk version to 1.13.2
This commit is contained in:
22
web/auth.html
Normal file
22
web/auth.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Authentication complete</title>
|
||||
<p>Authentication is complete. If this does not happen automatically, please close the window.</p>
|
||||
<script>
|
||||
function postAuthenticationMessage() {
|
||||
const message = {
|
||||
'flutter-web-auth-2': window.location.href
|
||||
};
|
||||
|
||||
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();
|
||||
</script>
|
||||
Reference in New Issue
Block a user