-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add flexibility to Slack auth flow via custom redirect params #343
Conversation
bump, I welcome any comments/questions. Or better yet, a merge if this is good as is :) |
5957ed9
to
6d13452
Compare
c9764a8
to
1338377
Compare
1338377
to
4c99d5b
Compare
Hey Botkit folks, I welcome any comments/feedback on this. We're using this (via our fork) quite successfully so far. |
var redirect_params = {}; | ||
if (slack_botkit.config.redirectUri) { | ||
Object.assign(redirect_params, req.query); | ||
delete redirect_params.code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ;
4c99d5b
to
19c3378
Compare
@anonrig Great thanks for explaining. I've updated the branch to address the feedback. |
19c3378
to
e5e976e
Compare
@anonrig quick bump to see if anything else was needed. I think I've addressed everything, but otherwise, please let me know... thanks. |
@sundeepgupta sorry for the delay, we'll get on evaluating this and other pending PRs very shortly. |
Awesome thanks! Cheers,
|
e5e976e
to
a70ca19
Compare
Thought I'd give this another bump... |
Allow passing of custom params into the Slack auth flow. The custom params are passed through the flow and are passed back into the `create_user` and `update_user` events. howdyai#329
a70ca19
to
ab9ae8b
Compare
:nudge: |
Please merge! |
AT LONG LAST, merged! Thanks for your patience, @sundeepgupta |
yay! |
#329
This will enable handling auth flows for various use cases by way of
redirect_uri
query params.If we stay with the existing design, I see two approaches:
a) Pass params around and only use them if the Slack App controller is configured with the
redirectUri
value.b) Pass the entire redirect URI around. This options gives more flexibility in case apps want to have multiple redirect URI endpoints. This might be useful if they want greater control over their auth flows than what Botkit provides.
For the app we're building, we don't have a use case for b), so I thought to try out a) and get some feedback.
Question (if the approach is ok):
Should the
redirect_params
be passed into thecreate/update_team
andcreate_bot
events also?