-
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
Release dev to master #363
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Description <!--- Describe your changes in detail --> Each time this action run, it will request reviews from committers. However, if the committers already approved, the request review operation will overwrite the approved review from committers. This PR fix this issue by checking the current review status before requesting review. ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> ## Notes <!-- Other thing to say --> ## Test <!--- Please describe in detail how you tested your changes locally. --> ## Screenshots (if appropriate): <!--- Add screenshots of your changes here --> ## TODO - [ ] Clear `console.log` or `console.error` for debug usage - [ ] Update the documentation `recnet-docs` if needed
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
## 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: 1. Add following API endpoints: - `GET /users/subscriptions/slack/oauth`: ger user's slack workspace name they installed - `POST /users/subscriptions/slack/oauth`: Post code from FE to slack API to exchange the access token, store information in DB - `DELETE /users/subscriptions/slack/oauth`: delete the user's slack information 2. Add back slack test API `POST /subscriptions/slack/test` 3. modify SlackTransporter logic to use the user's accessToken when sending messages 4. Add new slack fields and delete slackEmail fields in user table ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> ## Notes <!-- Other thing to say --> 1. AccessToken is encrypted in the storage and is decrypted before it needs to be used. Encryption key is stored as an environment variable. 2. Backward compatible. If the user has subscribed Slack channel without a user access token, we will use the one in env var. ## Test <!--- Please describe in detail how you tested your changes locally. --> 1. Run local server 2. Pasting this URL in your browser (fill in the scope and client_id) `https://slack.com/oauth/v2/authorize?scope={scope}&client_id={client_id}` <img width="1464" alt="Screenshot 2024-11-24 at 9 24 53 PM" src="https://github.com/user-attachments/assets/c771efc8-4e8c-490c-a984-dc81d20a4ae3"> 3. Choose a workspace and click allow button, pull the code in the callback request from devtools <img width="736" alt="Screenshot 2024-11-24 at 9 26 05 PM" src="https://github.com/user-attachments/assets/b5a9e8fa-c22b-45f9-9d3b-3cf490bd3e53"> 4. Use the code to hit `POST /users/subscriptions/slack/oauth` 5. Hit `POST /subscriptions/slack/test` to see if you got the slack message 6. Hit `GET /users/subscriptions/slack/oauth` and `DELETE /users/subscriptions/slack/oauth` to see if it works correctly ## Screenshots (if appropriate): <!--- Add screenshots of your changes here --> N/A ## TODO - [x] Clear `console.log` or `console.error` for debug usage - [ ] Update the documentation `recnet-docs` if needed - [ ] Update environment variables in staging and production env - [ ] Add unit tests - [ ] Add migration announcement with specific deadline
## Description <!--- Describe your changes in detail --> There's a "false" prefix in slack template. Remove it. ![Screenshot 2024-11-26 at 10 16 25 PM](https://github.com/user-attachments/assets/76d56de7-a4a1-4e99-937d-45599a31d624) ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> ## Notes <!-- Other thing to say --> ## Test <!--- Please describe in detail how you tested your changes locally. --> ## Screenshots (if appropriate): <!--- Add screenshots of your changes here --> ## TODO - [ ] Clear `console.log` or `console.error` for debug usage - [ ] Update the documentation `recnet-docs` if needed
## Description <!--- Describe your changes in detail --> Finish slack oauth flow. ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> - #261 - #64 ## Notes <!-- Other thing to say --> ## Test <!--- Please describe in detail how you tested your changes locally. --> Before test, update `.env.local` - `NEXT_PUBLIC_BASE_URL` should be `https://localhost:3000` - Add `SLACK_APP_CLIENT_ID` - Add `SLACK_OAUTH_APP_SCOPES` - Add`SLACK_OAUTH_REDIRECT_URI="/api/slack/oauth/callback"` Run `nx dev:ssl recnet` and go to `https://localhost:3000` - Go to setting and subscription tab -> Click the button to install slack app to your workspace - Should redirect you to slack page - Should able to choose different workspace - After clicking "Allow", should redirect back to frontend and see the success message - Go to setting again, should see the workspace name of where you install the app ## Screenshots (if appropriate): <!--- Add screenshots of your changes here --> ![Screenshot 2024-11-21 at 5 59 40 PM](https://github.com/user-attachments/assets/76d381f6-4dfd-49ee-976a-944b686a6d55) ![Screenshot 2024-11-21 at 5 59 50 PM](https://github.com/user-attachments/assets/092f53a1-81aa-4914-bebb-2ebc6f27f1d5) ![Screenshot 2024-11-21 at 6 00 07 PM](https://github.com/user-attachments/assets/cae362f9-58b8-4b0a-9f2a-ea4c1eb7dfc4) ## TODO - [ ] Clear `console.log` or `console.error` for debug usage - [ ] Update the documentation `recnet-docs` if needed
## Description <!--- Describe your changes in detail --> Fix the issue of `bad_redirect_uri` in staging env. The root cause is that if we specify the redirect_uri in the authorize and redirect stage, we should also pass the redirect_uri with code to access information in our backend service. Otherwise, if we setup multiple redirect URLs for the app, it will always take the first redirect URL and oauth will fail. Ref: https://api.slack.com/authentication/oauth-v2#asking ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> N/A ## Notes <!-- Other thing to say --> ## Test <!--- Please describe in detail how you tested your changes locally. --> ## Screenshots (if appropriate): <!--- Add screenshots of your changes here --> ## TODO - [ ] Clear `console.log` or `console.error` for debug usage - [ ] Update the documentation `recnet-docs` if needed
swh00tw
approved these changes
Dec 3, 2024
swh00tw
approved these changes
Dec 3, 2024
joannechen1223
approved these changes
Dec 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Related PRs
Staging links
recnet-web: https://vercel.live/link/recnet-git-dev-recnet-542617e7.vercel.app
recnet-api: https://dev-api.recnet.io/api