Comments (9)
Sounds like either the Slack bot api token is not there. When you filled out the details in ChiefOnboarding and went to the next step, you got a "add to slack" button. When you clicked that and added the bot, did you get redirected back to your chiefonboarding instance? That's required for the token to be fetched.
You can check if you have a token on the server:
python mange.py shell
from integrations.models import AccessToken
print(AccessToken.objects.get(integration=0, active=True).bot_token)
That should print out the secret token that has been set for the bot, used to interact with people.
from chiefonboarding.
Hi,
It did redirect me to the chief instance, but it seems that there is no token in the database:
Python 3.9.7 (default, Aug 31 2021, 18:27:13)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from integrations.models import AccessToken
>>> print(AccessToken.objects.get(integration=0, active=True).bot_token)
None
>>>
from chiefonboarding.
From DB side:
-[ RECORD 2 ]------+-------------------------------------------------------------------------
id | 10
integration | 0
token |
refresh_token |
base_url |
redirect_url |
account_id |
name |
active | t
ttl |
expiring |
app_id | redacted
client_id | redacted.redacted
client_secret | redacted
signing_secret | redacted
verification_token | redacted
bot_token |
bot_id |
one_time_auth_code | redacted
from chiefonboarding.
I found the bot token in slack app page (starting with xoxb-), can I insert this in the DB ?
If yes how exactly as the bot_token field is a bytea in pgsql table
from chiefonboarding.
id | 10
Did you try it multiple times? Seems like the ID is 10.
Anyway, yes you can, but you will have to do it through django like this:
python manage.py shell
from integrations.models import AccessToken
access_record = AccessToken.objects.get(integration=0, active=True)
access_record.bot_token = "xoxb-....."
access_record.save()
The bot_token
field is an encrypted field, so therefore you can't just insert it in the DB with an sql command. You have to use the script above.
from chiefonboarding.
Yes I tried a lot of time, deleting the slack app, recreating it, enabling DEBUG, etc.
Let me try to add the token manually and I will post here the result.
In any case, is it possible to diagnose why the token is not fetched ? Can you help and/or reproduce ?
from chiefonboarding.
Adding the token manually worked fine, the bot responded "You don't seem to be setup yet. Please ask your supervisor for access." to my "hello".
from chiefonboarding.
In any case, is it possible to diagnose why the token is not fetched ? Can you help and/or reproduce ?
Yeah, I will look into it probably next week.
Adding the token manually worked fine, the bot responded "You don't seem to be setup yet. Please ask your supervisor for access." to my "hello".
That's normal behavior. You are probably good to move forward with this now. If you want to get rid of that, then you will have to go to people->employees add yourself there and then click on "give access".
I will keep the issue open until I figured out why it didn't save it.
Thanks for letting me know!
Note to myself:
Probably not getting "ok" back. Might be a change Slack made.
ChiefOnboarding/back/integrations/views.py
Lines 68 to 74 in 08fe7b6
from chiefonboarding.
Hey, sorry for the late reply, but I just had time to look into it and figured it out. It's fixed once I merge this PR: #111 (which will happen in the next few hours)
Thanks again for reporting this!
from chiefonboarding.
Related Issues (20)
- Notification - Couldn't deliver email message: provider error HOT 1
- Bug with SSO and email case sensitivity HOT 1
- Item edit window closes when dropdown is clicked outside the window HOT 2
- Standardize URL naming
- Advanced integration options
- Share credentials with a New hire HOT 1
- Heroku deployment - Wrong dyno types HOT 1
- Adding admin task to manager/buddy who does not exist on new hire will raise error
- Trying to get in touch regarding a security issue HOT 1
- Adding Elestio as deployment option
- Subitems in numbered list do not appear in final copy HOT 1
- OIDC State parameter not present in Oauth2 authorisation request HOT 1
- Rename `person_type` to `assigned_to_role`
- Add offboarding undo option
- Using `{{access_overview}}` in `exists` part of manifest could lead to `RecursionError`
- Render - Setup - CSRF verification failed. Request aborted. HOT 2
- Admin task - Cant create in sequence HOT 2
- Contributing with new language HOT 1
- Conditional Blocks - Based on one or more to do item(s) HOT 2
- Docker Compose as directed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chiefonboarding.