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

Use session-based Spoke Portal magic link #1638

Open
bchrobot opened this issue Jul 13, 2023 · 0 comments
Open

Use session-based Spoke Portal magic link #1638

bchrobot opened this issue Jul 13, 2023 · 0 comments
Labels
improvement: enhancement ✨ Improvement to existing functionality platform: node 🔅 Related to Node backend platform: react ⚛️ Related to React client application

Comments

@bchrobot
Copy link
Member

Is your feature request related to a problem? Please describe.

https://github.com/politics-rewired/spoke-portal/pull/165 adds support for authenticated magic link sessions. This changes requires a JWT query parameter in the link provided to Spoke users.

Describe the solution you'd like

Spoke needs to update the tcrBrandRegistrationUrl field to include this JWT:

return [
{
__typename: "Register10DlcBrandNotice",
id: messagingServiceSid,
tcrBrandRegistrationUrl: `https://portal.spokerewired.com/10dlc-registration/${messagingServiceSid}`
}
];
}

This will required:

  1. Adding an envvar for the signing secret shared between Spoke and Spoke Portal
  2. Adding a root resolver for Notices to support fetching a tcrBrandRegistrationUrl at runtime when an admin user clicks the Notice call-to-action. This is because the generated JWTs should have an expiration of only ~30 seconds for security.

Describe alternatives you've considered

N/A

Additional context

N/A

@bchrobot bchrobot added platform: react ⚛️ Related to React client application platform: node 🔅 Related to Node backend improvement: enhancement ✨ Improvement to existing functionality labels Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement: enhancement ✨ Improvement to existing functionality platform: node 🔅 Related to Node backend platform: react ⚛️ Related to React client application
Projects
None yet
Development

No branches or pull requests

1 participant