AngellusMortis/django_microsoft_auth

View on GitHub
microsoft_auth/templates/microsoft/auth_callback.html

Summary

Maintainability
Test Coverage
{% load i18n %}

<html>
  <body>
    <p>{% trans "This window should automatically close. If it does not, it should be save to close after a few seconds." %}</p>
    <pre>{{ message }}</pre>
    <script>
      document.addEventListener("DOMContentLoaded", function(event) {
        // post message to parent window
        console.log("posting message to {{ base_url }}");
        console.log(window.opener);
        window.opener.postMessage({{ message }}, "{{ base_url }}");
        window.close();
      });
    </script>
  </body>
</html>