I’ve already implemented a system that sends a link to a person to sign up when they are invited. The triggering event is when the original user wants to assign a task to the new user, so I have an invite button.
The problem is, until the new user clicks the link and signs up, they don’t show up in the dropdown for assignment.
I HAD A THOUGHT
So, I thought I could use Create User for Someone Else. It would work as they show up in the dropdown, but there’s a twist.
BUT NOW I’M STUCK
The docs say I should send a password reset to the new user. We only allow users to login via Google or Microsoft social sign ins, so email sign in is not available.
HELP ME OBI-WAN!
So, how do I use Create User for Someone Else, but instead of making the user reset a password, direct them instead to login with either Google or Microsoft accounts?
If I put my social login buttons on the Password Reset page, would this work?
What do I need from the Password Reset page/workflow to ensure this association is successful?
Another approach that I use is to have a separate table that holds staff details and link it to the user account.
I have a need for a customer to be able to allocate staff to work before the staff have signed up. (similar to you)
I let managers create a staff account, allowing staff settings to be created and appearing in drop-down’s etc. That also triggers the signup process and links a User account to the staff account. They are already matched and users see their staff settings when they signup but its actually independent of a signup being completed.
Its actually good practice as it normalises the data too (IE you don’t want all the staff stuff attached to the User account anyway)
In our case, email login is disabled as these are Enterprise users. So, @jacobglanz9, we can’t log them in per se with email. @rico.trevisan, in our case, only social logins are allowed.
That’s why I’m wondering if I can simply put my social login buttons on the reset password page, hide the password fields and let them log in using the social login. I’m assuming that Bubble should know what user is being logged in since you sent the magic link.
Oh, I like it and I wouldn’t have to rearchitect my existing invitation code. In fact, since I encode my invitation url with other values for their user record, I could simply add a staff id to that url.
Ok, that’s one solution to evaluate the impact. Thanks @johnnyweb!
Its worked well for me @treb.gatte as I’ve been asked to expand on staff features I just keep adding to the staff table and keep users nice and clean. Users just holds things requires to service login and UX (like preference for day/night mode etc)… I even have a trigger on User name changes that push a change to the staff name just so they are all in sync
That said, the risk of screwing up what works already vs the gain had by this technique leads me back to @johnnyweb’s solution as being easier to implement and less risky. I simply need to trace all of the paths where I enable a person to be invited.
1. You have an issue that when you invite a new user you wanna be able to assign them with projects/tasks immediately. You can’t accomplish that with create an account for someone else. So how do do it?
You will have a workflow that will create the account for the new user with their email, and set a random password (The only reason to set a password is because it’s required when creating a user) and now you will have a new user in the database so you can assign them to task/projects.
2. Now that the account is created you want your user to gain access to their account, but you don’t want to let theme log in with their Email/Password. How do we accomplish that? Before we move forward i have to explain 1 thing about bubble; If a user of your app has an account with you already and they wanna add a social login like Google Microsoft etc. as an additional login method for their account, they can do it but they must be logged in to their account while they’re setting up the new login method.
So now we will send a magic login link to the user and set the Navigate to login page, and this will log them into their account the same as they would have entered their Email-Password themselves on a login form, but the only difference is that they have no idea what their password is (because you’ve create it for them earlier in step 1)
3. Once the user is logged in, show a pop up for the user to connect their social account.
After their social account is connected they will be able to login with their social account.
And you have to add a field
And even they have a email-password set up to them they will never know and will never be able to login in with it, because you don’t have a Email-Password login form and they don’t know their password.
The user experience will be as follows.
They receive an email. Hi Jacob, You’ve been invited to Company x, Please click on the link below get your account access, after they click the link they will be directed to a page where they connect their social account.