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

chore(shorebird_code_push_protocol): add CreateUserRequest message #321

Merged
merged 3 commits into from
Apr 19, 2023

Conversation

bryanoltman
Copy link
Contributor

Description

Adds a CreateUserRequest message to support self-serve signup.

Part of #281

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@bryanoltman bryanoltman requested a review from felangel April 19, 2023 14:54
/// {@template create_user_request}
/// The request body for POST /api/v1/users, which creates a new User.
///
/// Email is retrieved from the user's auth token.
Copy link
Contributor

@felangel felangel Apr 19, 2023

Choose a reason for hiding this comment

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

Seems a bit weird to require an access token for user creation imo. I would have expected the endpoint would be open and we'd provide email and display name explicitly in the request body.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I originally had designed it that way and then realized I could (potentially maliciously) create accounts for anyone I wanted to. This approach adds some level of verification that the person creating the user is who they say they are, although it will probably need to be tweaked a bit if/when we expand our auth offerings.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I see makes sense to do that for now since that's simpler/safer. We can change it in the future 👍

@bryanoltman bryanoltman merged commit 22a66df into main Apr 19, 2023
@bryanoltman bryanoltman deleted the bo/create-user-api branch April 19, 2023 15:45
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.

2 participants