igogiko

Untitled

May 25th, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.21 KB | None | 0 0
  1. <html lang="en">
  2. <head>
  3. <meta charset="utf-8">
  4. <title>Twitch Chat Password Generator</title>
  5. <link href="//twitchapps.com/bootstrap/css/cosmo.css" rel="stylesheet" />
  6. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  7. <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
  8. <script type="text/javascript" language="javascript">
  9. $(document).ready(function() {
  10. var oauthHash = location.hash.substr(1);
  11. var accessToken = oauthHash.substr(oauthHash.indexOf('access_token=')).split('&')[0].split('=')[1];
  12.  
  13. if (accessToken) {
  14. $("#infoTable").hide();
  15. $("#passwordTable").show();
  16. //$("#tmiPassword").text('oauth:' + accessToken);
  17. $("#tmiPasswordField").val('oauth:' + accessToken);
  18. $("#tmiExample").html('/nick yourtwitchusername<br />/server irc.twitch.tv 6667 oauth:' + accessToken);
  19. }
  20. });
  21. </script>
  22. <style>
  23. #tmiPasswordField {
  24. cursor: default !important;
  25. }
  26. #tmiExample {
  27. display:block;
  28. }
  29. </style>
  30. </head>
  31. <body style="padding-top: 20px;">
  32. <div class="container-fluid">
  33. <div class="row-fluid">
  34. <div class="span12">
  35. <div style="width:600px;margin:auto;">
  36. <table class="table table-bordered table-striped" id="passwordTable" style="display:none;">
  37. <tr>
  38. <th>Twitch Chat OAuth Password Generator</th>
  39. </tr>
  40. <tr>
  41. <td>
  42. <div style="text-align:center;padding-bottom:10px;">
  43. <p>
  44. Use the following password to login to chat:
  45. </p>
  46. <!-- <code id="tmiPassword" onClick="this.select();"></code> -->
  47. <input class="span9" type="text" id="tmiPasswordField" onClick="this.select();" readonly="readonly">
  48. <br />
  49. <br />
  50. <p>Example: <br />
  51. <code id="tmiExample">/nick &lt;yourusername&gt;
  52. </code></p>
  53. </div>
  54. </td>
  55. </tr>
  56. </table>
  57. <table class="table table-bordered table-striped" id="infoTable">
  58. <tr>
  59. <th>Twitch Chat OAuth Password Generator</th>
  60. </tr>
  61. <tr>
  62. <td>
  63. <div class="well">
  64. <p>
  65. As of Sept. 17, 2013, Twitch now requires that you log into IRC using an OAuth token instead of your plaintext password or hash for additional security.
  66. </p>
  67. <p>
  68. Use this tool to generate an OAuth token to authenticate with Twitch IRC. The entire presented token (including "oauth:") can be substituted for your old password in your IRC client.
  69. </p>
  70. <p>
  71. <strong>Note: Each time you use this tool it will invalidate any previous tokens. It is recommended that you save it for reference if you are using multiple clients.</strong>
  72. </p>
  73. <p><small>
  74. (Technical: This application uses the <a href="https://github.com/justintv/Twitch-API/blob/master/authentication.md#implicit-grant" target="_blank">implicit grant flow</a> for the Twitch API to retrieve your token. This means that your token is only ever visible to your browser and not our server.)
  75. </small></p>
  76.  
  77. </div>
  78. <div style="text-align:center;padding-bottom:10px;">
  79. <a href="https://api.twitch.tv/kraken/oauth2/authorize?response_type=token&client_id=q6batx0epp608isickayubi39itsckt&redirect_uri=http://twitchapps.com/tmi/&scope=chat_login"><img src="//ttv-api.s3.amazonaws.com/assets/connect_dark.png" /></a>
  80. </div>
  81. </td>
  82. </tr>
  83. </table>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </body>
  89. </html>
Add Comment
Please, Sign In to add comment