google-oauth.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <form action="" method="post" class="form-horizontal passportStrategy" id="googleOauthSetting" role="form">
  2. <fieldset>
  3. <legend>Google OAuth Configuration</legend>
  4. <p class="well">(TBD)</p>
  5. </fieldset>
  6. </form>
  7. {% if false %}
  8. <hr>
  9. <h4>
  10. <i class="fa fa-question-circle" aria-hidden="true"></i>
  11. <a href="#collapseHelpForApp" data-toggle="collapse">How to configure Slack App?</a>
  12. </h4>
  13. <ol id="collapseHelpForApp" class="collapse">
  14. <li>
  15. Register Slack App
  16. <ol>
  17. <li>
  18. Create App from <a href="https://api.slack.com/applications/new">this link</a>, and fill the form out as below:
  19. <dl class="dl-horizontal">
  20. <dt>App Name</dt> <dd><code>crowi-plus</code> </dd>
  21. <dt>Development Slack Team</dt> <dd>Select the team you want to notify to.</dd>
  22. </dl>
  23. </li>
  24. <li><strong>Save</strong> it.</li>
  25. </ol>
  26. </li>
  27. <li>
  28. Get App Credentials
  29. <ol>
  30. <li>Go To "Basic Information" page and make a note "Client ID" and "Client Secret".</li>
  31. </ol>
  32. </li>
  33. <li>
  34. Set Redirect URLs
  35. <ol>
  36. <li>Go to "OAuth &amp; Permissions" page.</li>
  37. <li>Add <code><script>document.write(location.origin);</script>/admin/notification/slackAuth</code> .</li>
  38. <li>Don't forget to <strong>save</strong>.</li>
  39. </ol>
  40. </li>
  41. <li>
  42. Set Permission Scopes to the App
  43. <ol>
  44. <li>Go to "OAuth &amp; Permissions" page.</li>
  45. <li>Add "Send messages as crowi-plus"(<code>chat:write:bot</code>).</li>
  46. <li>Don't forget to <strong>save</strong>.</li>
  47. </ol>
  48. </li>
  49. <li>
  50. Create a bot user
  51. <ol>
  52. <li>Go to "Bot Users" page and add.</li>
  53. </ol>
  54. </li>
  55. <li>
  56. Install the app
  57. <ol>
  58. <li>Go to "Install App to Your Team" page and install.</li>
  59. </ol>
  60. </li>
  61. <li>
  62. (At Team) Approve the app
  63. <ol>
  64. <li>Go to the management Apps page for the team you installed the app and approve crowi-plus.</li>
  65. </ol>
  66. </li>
  67. <li>
  68. (At Team) Invite the bot to your team
  69. <ol>
  70. <li>Invite the user you created in <code>4. Add a bot user</code> to the channel you notify to.</li>
  71. </ol>
  72. </li>
  73. <li>
  74. (At crowi-plus) Input "clientId" and "clientSecret" and submit on this page.
  75. </li>
  76. <li>
  77. (At crowi-plus) Click "Connect to Slack" button to start OAuth process.
  78. </li>
  79. </ol>
  80. {% endif %}