Team invite via Jetstream 404's #374
-
Hello, I have added teams via https://jetstream.laravel.com/features/teams.html . Social stream and socialite are also working correctly via gmail on https://staging.blawby.com/ . After logging in and attempting to add a member (settings > members > add), I am able to successfully invite a new user, and the email successfully sends. However, in that default jetstream email a link to accept invitation is included which leads here: https://staging.blawby.com/team-invitations/1?signature=ad8181e6a6a40d5b115ad59862b1350495acf3c0a728487a78a00f0492eea792 that link 404's. If I attempt to register with the email that was invited to the team, a new laravel team is created instead of joining the team that invited that user email. Perhaps I have missed something in this setup flow? Im expecting to be able to add new users to my team and let them interact with my team dashboard. I asked a friend who gave this feedback as to how he fixed it in 2023:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @paulchrisluke I've not been able to replicate this with a fresh install locally. The 404 would indicate that the team invite doesn't exist for that user. Can you confirm that the team invite with ID |
Beta Was this translation helpful? Give feedback.
-
Hi @joelbutcher, we were looking for a flow where a team admin invites a team member and that email joins the team that invited them. I should have more specific in my question, and I apologize. By default, it appears any new email creates a new personal team. It was a bit confusing and we took reference from this post around the expected user flow: https://mariogiancini.com/making-laravel-jetstream-team-invitations-better In general, instead of every new email creating a new personal team, we wanted the invited email to join the inviting team. As it relates to social stream, we had to make a few changes: Check for Invitation in User Creation: In Socialstream (specifically CreateUserFromProvider.php), modified the user creation flow to first check if an invitation exists for the user’s email:
Handle Invited Users: Added a method to attach the invited user to the correct team:
This, in tandem with the mentioned post ui/ux changes allowed us to re-create a solution we were looking for. |
Beta Was this translation helpful? Give feedback.
Hi @joelbutcher, we were looking for a flow where a team admin invites a team member and that email joins the team that invited them. I should have more specific in my question, and I apologize.
By default, it appears any new email creates a new personal team. It was a bit confusing and we took reference from this post around the expected user flow: https://mariogiancini.com/making-laravel-jetstream-team-invitations-better
In general, instead of every new email creating a new personal team, we wanted the invited email to join the inviting team.
As it relates to social stream, we had to make a few changes:
Check for Invitation in User Creation:
In Socialstream (specifically CreateUserFromP…