-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[recnet-api] Slack oauth API #364
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
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.
I think we should add some document somewhere (maybe in notion or use comment or both) about
- How you do the encryption/decryption (which algo we choose)
- The decision and more context about backward compatibility
apps/recnet-api/src/modules/slack/transporters/slack.transporter.ts
Outdated
Show resolved
Hide resolved
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.
Great works! I've tested the endpoints. Please fix the failed test before merge.
## RecNet auto-release action This is an auto-generated PR by recnet-release-action 🤖 Please make sure to test your changes in staging before merging. ## Related Issues - #261 - #64 ## Related PRs - #369 - #361 - #365 - #364 - #362 ## Staging links recnet-web: [https://vercel.live/link/recnet-git-dev-recnet-542617e7.vercel.app](https://vercel.live/link/recnet-git-dev-recnet-542617e7.vercel.app) recnet-api: [https://dev-api.recnet.io/api](https://dev-api.recnet.io/api)
Description
This PR is the backend part of migrating slack app to the oath access token, which will resolve the limitation of single workspace.
Doc: https://www.notion.so/Slack-OAuth-flow-14551bd6607c80d08a13f56c04a81abd
What's included in this PR:
GET /users/subscriptions/slack/oauth
: ger user's slack workspace name they installedPOST /users/subscriptions/slack/oauth
: Post code from FE to slack API to exchange the access token, store information in DBDELETE /users/subscriptions/slack/oauth
: delete the user's slack informationPOST /subscriptions/slack/test
Related Issue
Notes
Test
https://slack.com/oauth/v2/authorize?scope={scope}&client_id={client_id}
Screenshots (if appropriate):
N/A
TODO
console.log
orconsole.error
for debug usagerecnet-docs
if needed