• Resolved john0zzz

    (@john0zzz)


    I am currently working on creating a set of forms with WPForms and I need to protect the pages from public access while allowing users of a separate site to access the page.

    The other site is custom built with PHP and does not use any specific frameworks.

    I want users to log into the other site and click on a link to take them to a protected page on our WordPress site. The page/WPForms will have no access to retrieve data and is essentially only going to be submitting ‘orders’.

    I have some experience with PHP (and java) but very little experience with WordPress.

    I am thinking that the easiest way to do this would be to pass an authentication code as a parameter as part of the link and have some code on the wordpress site that will verify that the authentication code is valid and then pass the user on to the correct page.

    Any idea if there is a plugin that can do this? How would I go about coding this manually? Sorry, I’m new to WordPress.

    Thank in advance for any help you can provide in pointing me the right direction.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Vijay Hardaha

    (@vijayhardaha)

    2 possible ways

    1. You can create password-protected pages and you can share the page password with the users that will be allowed to access the page.

    2. You can create a custom shortcode and inside that shortcode, you can wrap your other shortcodes or post content.
    and in shortcode function, you can use a token that you will pass from an external website and receive in your WordPress website using $_GET then you will validate this token by sending a curl or HTTP request on PHP website. make sure this token should be stored somewhere in a database for validation.

    then if the token is validated then you can show the content otherwise you can display the notice on that shortcode return content.

    Thread Starter john0zzz

    (@john0zzz)

    Thanks for your help, @vijayhardaha. I think we found another solution that we can use because the other site is actually being hosted on the same server.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Simple external authentication for a page?’ is closed to new replies.