'Just make a token' in password reset process

I’m integrating Postmark into my app for handling emails. I’m connecting to it using the Bubble API connector and all is going well. I’m just after converting my ‘Forgot password’ flow by calling a ‘Send password reset email’ action and ticking the box for ‘Just make token, don’t send email’ and then using the result of that step in the next step which calls my ‘Send forgot password email’ action in my Postmark API Connector as follows. It’s working!

But… since the token is just a long number, I’ve had to manually create the link in my action by appending the path to my app to it. So currently I’m working on the DEVELOPMENT version and the path is:

https://xxx/version-test/reset_pw?reset=xxx

When I deploy to LIVE, I assume I’ll have to remember to remove “/version-test/” from the path? Or is there a simpler way to do this? Could I put a conditional in to test if I’m in LIVE or DEVELOPMENT?

Also, in doing my background reading about this I’ve seen posts where people are saying they could only generate this token on the back-end and not on the client-side. I see to be successfully generating it on the client-side - has something changed?

Thanks!

Can’t comment too much on whether this token is now accessible via client-side workflows, but as for your /version-test/ question, you can replace https://locumhub.ie/ with the dynamic expression Website home URL.

In Main it will evaluate to https://locumhub.ie/version-test/ and in Live it will evaluate to just https://locumhub.ie/

1 Like

Ok cool.
I just came up with another way of doing it by duplicating the step and using a condition ‘Only when: Isn’t live version is yes’ and ‘Only when: Isn’t live version is no’ on each.

But I think your way is probably more robust - thanks!

This topic was automatically closed after 70 days. New replies are no longer allowed.