Initiate forgot password email and process manually

Hi again,

Trying to build a new app now…

I have a scenario where an “admin” user creates new users (rather than having the user sign up directly). For example, the users need to be invited to use the app. I have a custom form that will create a new user, which works fine.

I want the app to send an email (either Sendgrid or built in process) to the new user inviting them to login. Is it possible to have the “forgot password” process initiated without user having to click “forgot password”? I’d like to have the temporary password included in the welcome email and include the change password on first login process, but do it upon new user creation or another action. Can that be done?

I guess the worse case scenario is that the user will have to just click forgot password link, but trying to make it a bit more professional than that…

Thoughts?

Thanks!

Hi @paulh

Yes, this is also possible.

When you create new user and put temporary password in password field, put this into another additional field (text), we can call this tmp password.

When you send email, use this tmp password field, because it can be used openly.

If you want to force user to change password, have another boolean field that can be checked to link to another screen that ask old password and create new ones.

2 Likes

Thanks @Yongki. But if I use random number generator to create a code, I can’t save the same number in two different fields. Right? I can save a known password directly in the password field, the problem is saving a random code.

But I think victor did a video a while ago about how to create a custom forgot password process which looks like it could work!

For this, have tmp password updated first, and then do second update to update password field only.

There are more than a way in Adalo to do things, we just need to have to experience it first.

2 Likes

Hi @paulh,

This video might be useful for you: Adalo tutorials: multistep customized password reset - YouTube
Same logic could be applied to new user creation.

Note: if you’re a part of User Permissions beta (you have a shield icon on Users collection like on the screenshot)

Then Step 3 on the video won’t work: you’ll see the message “Action can’t be completed”. The reason for this is that on Step 3 you set a password at the moment when you’re not logged in, so default User Permissions don’t allow to do it.
You need to change the permission like this in order to make it work. It doesn’t mean that “Everyone” will edit the password of the user - it means that for password change request Adalo won’t check additional permissions and proceed.

Best regards,Victor.

1 Like

Thanks @Victor. Yes, I saw your video and was going to do that, but this is how I ended up doing it:

When the user is created I set a random password and save it to user: tempPassword field, then copy it to password field (two actions).

Then an action sends a sendgrid email to that user with a welcome message and the temp password.

When new user tries to login, the login submit button has two conditional actions. If tempPassword is not 0, user logs in then has to set a new password, then an action to set tempPassword field to 0. If tempPassword is 0 then do normal login.

Works quite well actually, I’m very proud of myself :slight_smile:

2 Likes

Hi @paulh,

Just in case - there were some issues with conditional actions upon login/signup. Please see the thread here: Problem restricting users without access code
I’m not aware if these problems still exist or not - though I haven’t heard about any resolution. So personally I avoid using conditionals on login & signup.

In your case, the scenario could be modified by adding a “interim home” screen, making it a home, which will have a on-screen-enter actions to direct either “set password” screen (tempPassword not equal to 0), or to a real home screen (tempPassword=0).
This “interim home” should be set to Home to match the case when user closes the app on it, then reopens it (so that anyway he/she will be directed to set new password).

Best regards, Victor.

2 Likes

@Victor the conditional actions on login seem to be working in my limited testing. I can get the login submit button to link to different pages based on conditions. Hopefully any previous issues are fixed!

Edit. I might have spoken too soon… looks like something funky is going on. Sometimes it works and sometimes it doesn’t. Edit 2: Ok it’s not working properly (although it does sometimes). Shouldn’t have expected too much from Adalo I guess.

Edit: your method works Victor, but the screen does a little “shuffle” between logging in and going to Home Screen.

1 Like

@paulh you can try different transition styles to make the UI look nicer.
I usually put some nice minimalistic picture to “Interim home” along with a text label “Setting up everything for you…” or similar. This creates user perception that app is doing something important :slight_smile: (which is true in fact :slight_smile: ).

Best,
Victor.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.