This SlackApp allow you to take advantage of FactorialHR signin.
Clone this repository:
git clone https://github.com/Anexon/factorialSignInSlack.git
Install all dependencies using npm:
npm install
Create your first app on slack: create app
Navigate to Oauth & Permissions section and copy the Oauth Access Token of your app. Paste the token into the .env file of the cloned project
slack_app_token=paste_your_token_here
Go back to your SlackApp Oauth & Permissions and scroll down to Scopes and add following permissions:
Save changes and navigate to Slash Commands section. Now add this commands one by one:
As Url Request you may put
https://heroku-app-name.herokuapp.com/api/commands
Where heroku-app-name is the name you will put to your Heroku app in next section, so remember to change it if you use different name.
Now navigate to Basic Information section and be sure SlackApp is installed into your workspace
Register on Heroku and create you app where you will upload repository you just have cloned. Heroku will build and run the project so you may have an accesible server that will handle all commands triggered from slack channels.
Install Heroku
brew install heroku/brew/heroku
(on macOS)
For other OS check this link
Login into your Herokue account
heroku login
cd to the root cloned repository folder and deploy proyect into heroku using the name you just put when creating Heroku App.
heroku git:remote -a your_heroku_app_name_here
Add some space in the code and commit to push into Heroku
git add .
git commit -am "make it better"
git push heroku master
Server is ready to handle slack commands. You may go to your slack workspace and type commands!
After launching a command go and check into you Factorial account if Signing is beign registered so check that everything is working.