Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

amd support + optional callback instead of tracking closed state #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mente
Copy link

@mente mente commented Sep 28, 2012

Hello,

This PR adds amd support and optional callback for finished authorization, instead of tracking closed state. Example of response instead window.close():

<script type="text/javascript">
window.callback({user: avasilenko, token: 123});
</script>

Regards,
Alex

optional callback instead of tracking closed state
@mente
Copy link
Author

mente commented Oct 2, 2012

added elegant callback injection as seen on stackoverflow

@mente
Copy link
Author

mente commented Oct 2, 2012

appeared that direct callback injection had problems if there was any page loading instead of direct redirect.
Latest commit assumes following call:

<script type="text/javascript">
window.opener.oauthCallback({user: avasilenko, token: 123});
</script>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant