• ryanyoung

    (@ryanyoung)


    Environment:
    We’ve got an external front end website in WordPress that serves as a front for our core website, and we’re implementing self sign up. We have a sign up form, but the form button needs to call an internal API to create the user, passing the form data, and showing any potential errors returned. Success should result in a redirect to the core website.

    Problem:
    I’ve created an external API as a JS bundle (webpack) that I want to install as a custom plugin. I want to install the plugin or manually add a <script> tag to import this library plugin. I want to, on submit button click, pass the form data to the API (which knows how to talk to our core site and server). If an error occurs, I want to display it on the form page. If a success occurs, I want to redirect to the core website.

    This is my first time ever working with WordPress, so I’m unsure of how to do this, or if it’s possible. If anyone knows if this is possible, or other potential solutions, it would be much appreciated. If it’s too much work, or not possible, to do this in WordPress, we’ll just take ownership of this in our core app (outside of WebPress.)

    • This topic was modified 6 years ago by ryanyoung.
    • This topic was modified 6 years ago by ryanyoung.
Viewing 4 replies - 1 through 4 (of 4 total)
  • corrinarusso

    (@corrinarusso)

    What authentication method does the non-wordpress site use ?
    Is there any LDAP involved ?
    There are SSO integration points already, such as :
    https://www.greengeeks.ca/tutorials/article/activate-the-built-in-vpn-in-the-opera-browser/

    Here’s some really good detail on a proven approach :
    https://www.offshorly.com/news/sso-wordpress-authentication-using-external-api/

    Thread Starter ryanyoung

    (@ryanyoung)

    @corrinarusso Thanks for the reply. We already have a sign-in solution in our core app, but we don’t have a sign-up ability yet. Originally, this front end (in WP) was for marketing and product demo sign-up. We wanted to utilize this as our entry point for user sign-up as well, which is why the external library was created to hopefully allow it to call into our app to create the user and sign them in.

    It’s seeming like this isn’t really what a simple WordPress wpform was meant for, however. As I stated above, we may just have to take ownership of this in our core app and just have a redirect link on the front end WP app.

    Thanks again for looking into this! Any other thoughts are appreciated.

    corrinarusso

    (@corrinarusso)

    Have you used Zapier for anything in the past ?
    https://zapier.com/apps/webhook/integrations

    Thread Starter ryanyoung

    (@ryanyoung)

    @corrinarusso Thanks. I know the people that manage our WP site do use Zapier, but I’m not sure to what degree, or what additional cost we could incur. I’m also looking at the Zapier developer platform to see if it makes sense to create a private zap for our core server, since it services HTTP GET / POST / PUT operations w/ support of auth headers.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Integrating and using custom plugin on button press’ is closed to new replies.