Created
September 26, 2018 19:04
-
-
Save wyattjoh/be3924a621de0a127ded0c9a5fbafbf7 to your computer and use it in GitHub Desktop.
Example for listening for the `action.SHOW_SIGNIN_DIALOG` event to trigger a client side redirect to an external auth source.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='coralStreamEmbed'></div> | |
<script src="https://url.for.talk.com/static/embed.js"></script> | |
<script> | |
function attachToEvents(events) { | |
events.on('action.SHOW_SIGNIN_DIALOG', function() { | |
window.href = "https://url.for.logging.user.in.com/"; | |
}); | |
} | |
Coral.Talk.render(document.getElementById('coralStreamEmbed'), { | |
talk: 'https://url.for.talk.com/', | |
events: attachToEvents, | |
auth_token: 'maybe your user\'s auth token?', | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment