Skip to content
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

[My Site Migration] feat: add discord route #982

Merged
merged 3 commits into from
Jan 18, 2025
Merged

Conversation

tejaskh3
Copy link
Member

@tejaskh3 tejaskh3 commented Jan 16, 2025

Date: 17 January, 2025

Developer Name: Tejasgp

Description:

This PR introduces the integration of Discord account linking functionality. The following updates have been made:

Key Features:

  • Tracks the Discord ID and linking status.
  • Provides user feedback through toast notifications.
  • Implements consent handling before linking the Discord account.
  • Handles API responses for linking, including token expiration and errors.

Issue Ticket Number:

Pending Work:

  • Add UI design and logic to discord.hbs in future PRs.
  • and test cases for the same

Is Under Feature Flag:

  • Yes
  • No

Database Changes:

  • Yes
  • No

Breaking Changes:

  • Yes
  • No

Is Development Tested?

  • Yes
  • No

Copy link

cloudflare-workers-and-pages bot commented Jan 16, 2025

Deploying www-rds with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0a8430c
Status: ✅  Deploy successful!
Preview URL: https://c1391a2c.www-rds.pages.dev
Branch Preview URL: https://feat-discord-page.www-rds.pages.dev

View logs

@tejaskh3 tejaskh3 changed the title feat: add discord route [My Site Migration] feat: add discord route Jan 16, 2025
app/constants/urls.js Outdated Show resolved Hide resolved
app/routes/discord.js Show resolved Hide resolved
app/templates/disocrd.hbs Outdated Show resolved Hide resolved
joyguptaa
joyguptaa previously approved these changes Jan 17, 2025
Comment on lines 3 to 10
export default function () {
let authUrl = AUTH.GITHUB_SIGN_IN;
if (typeof window !== 'undefined') {
const separator = authUrl.includes('?') ? '&' : '?';
authUrl = `${authUrl}${separator}redirectURL=${encodeURIComponent(window.location.href)}`;
}
window.open(authUrl, '_self');
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • change this function to a named export.
  • can we use UrlSearchParams to handle search params instead of doing authUrl.includes('?') ? '&' : '?';?
  • can we use window.location.href instead of window.open?

@iamitprakash iamitprakash merged commit f27aac6 into develop Jan 18, 2025
3 checks passed
@iamitprakash iamitprakash deleted the feat/discord-page branch January 18, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants