Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.postmessage for Interactive Auth fallback #398

Merged
merged 2 commits into from Oct 10, 2016

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Oct 6, 2016

Require that User-Interactive auth fallback pages call window.postMessage to notify apps of completion.

Require that User-Interactive auth fallback pages call
`window.postMessage` to notify apps of completion.
@@ -562,12 +567,13 @@ the type and session, if provided:
.. code:: json

{
"type": "m.login.dummy"
"type": "m.login.dummy",
"session": "<session ID>"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be slightly confusing since there's no reason you'd ever submit a session with dummy auth

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we agreed to leave this as-is for consistency with the other login types. The logic is "if you get a session id, send it back", not "if you get a session id, send it back, unless you're doing dummy auth, in which case you don't need to bother".

var popupWindow;

var eventListener = function(ev) {
if (ev.data !== "authDone" ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably ought to check the domain of the event sender here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@dbkr dbkr assigned richvdh and unassigned dbkr Oct 7, 2016
@richvdh
Copy link
Member Author

richvdh commented Oct 7, 2016

ptal?

@dbkr dbkr merged commit 8cd9221 into master Oct 10, 2016
@richvdh richvdh deleted the rav/uia_fallback_postmessage branch October 12, 2016 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants