jQuery-OAuth-Popup icon indicating copy to clipboard operation
jQuery-OAuth-Popup copied to clipboard

amd support + optional callback instead of tracking closed state

Open mente opened this issue 12 years ago • 2 comments

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

mente avatar Sep 28 '12 11:09 mente

added elegant callback injection as seen on stackoverflow

mente avatar Oct 02 '12 15:10 mente

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>

mente avatar Oct 02 '12 15:10 mente