Have the ability to resend verifySignup from main app

I need to be able to give my users access to resend verifySignup from the main app. I looked at the documentation but I don’t know what I need to do.

Please help.

As the docs show here, the authResend action will do what you’re looking for. All you need is to make sure you have a key in your model labeled email, then attach that action to a button.

There isn’t an example specifically for this action, but it’s the exact same process as the Auth - Forgot example, so if you wanted to put this on it’s own page, I would suggest duplicating that page as a starting point.

I don’t want to put it on a page, rather I need to attach things to a button in FileMaker where I have no model.

I see. At this time that’s not possible because the authentication tokens are generated on the BetterForms server and we don’t yet have an API to expose those functions outside of these actions that are initiated in the browser.

What you might be able to do instead (assuming it’s a new user account that had trouble verifying their email) is use the API script in the helper file to delete the BF user (this can be done completely on the FM side), then instruct your user to simple register for a new account which will trigger the verification email

The problem is that a lot of these emails end up in spam for my users’ users, and they need to be able to help out, so they don’t have to come to me every time, because this puts a strain on the entire FMBF app, since we have a 3-hour time difference. They might just abandon FMBF altogether if we don’t come up with something.

What if search FMBF from my app, create the model from the stored data, then run the auth script?

I concur with Eric, and in fact we have this on the BF dashboard if you are not verified.
Its a button that conditionally shows if not isVerified.

User clicks and it runs the action. That sends them the verify email.

This is something you as a dev need to add if you want that business logic.

Like @delfs suggests, you can build your own system of verifying user emails if you really want to. I’ve done that for one of my apps. The process is something like:

  • When a user registers, use the User API script in the helper file to force their email as “verified”. Alternatively set that field in the Manage Database to always evaluate True
  • In your own users table, store a verification token and send your own email
  • Build a BF page that can read the token from the URL in an onFormRequest hook so that when the user clicks the link in your verification email you can mark them as registered.
  • If you need to resend the email, you can do that from your own table
  • Using the onLogin hook script, you will need to do additional steps to ensure they are verified through your custom system

Of course, if you need extra features that BF provides automatically (such as expiring the token after a certain amount of time, etc) you’d have to build those in also.

If you just want to resend the verify email, just put a button on the layout that says “Resend”
Then that runs the resend action. email must be in the model.

Maybe I’m missing what @agir is asking?

If it must be from FM, then a webviewer that hits a page that has the action.

She wants admins to be able to do this from within FileMaker, but really anyone can resend a verification email if you give FileMaker users a BF form to enter an email and resend. That might be much simpler—and you could even do it within a webviewer in FM

Agreed, a web viewer with a query email key and that can hit a page to run the action.

Ok, I created a button on the login page and assigned it a “resend” action:

{
  "actions": [
    {
      "action": "runUtilityHook",
      "options": {
        "type": "resendVerifySignup"
      }
    }
  ],
  "buttonClasses": "btn btn-info btn-block",
  "label": "",
  "styleClasses": "col-md-12",
  "text": "Resend Verification Email",
  "type": "button"
}

This doesn’t work.

That is a runUtilityHook not a authResend.

Reference: https://docs.fmbetterforms.com/reference/actions-processor/authentication-actions

To resend email verify link:

model must contain

"email" : "email@mail.com"

and you need to trigger the authResend action.

Ok, got it working, thank you. Maybe the search should work better in the docs: