• sehrbar

    (@sehrbar)


    Hello,
    Is it possible to automatically log in users who come to my site via a specific url (e.g. example.com) as a specific user? If yes, how?

    (Background: I run a site with protected posts. Now these are to be loaded into an external database to which only very few have access. So that the users of this external database do not need a login, they must be able to be logged in automatically).

    Thanks a lot in advance!

    • This topic was modified 2 years ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • mrtom414

    (@mrtom414)

    I think you would probably want to look at something like the Rest api were you could create an authentication key and have a program that would allow you to read and write data based on the key. I don’t think it would be to safe to grant permissions based on what url someone is coming from. I am pretty sure you can spoof your url to make it look your coming from anywhere.

    Wordpress has a restful state so such an application could be created using WordPress. You would need to find a developer who is good at working with WordPress Rest API. You can see Rest in action with the following URL.

    https://<<yourdomain>>//wp-json/wp/v2/pages

    this will give you a list of all the pages on your site. The results are returned in a json file. You can determine what information you want to return based on the key.

    Rest is platform independent so you can create the application on any platform or using your language of choice.

    • This reply was modified 2 years ago by mrtom414.
    Thread Starter sehrbar

    (@sehrbar)

    Thank you very much for your time and the proposed solution! I understand the security concerns, but we are not talking about sensitive content here, but “only” content behind a paywall. So it wouldn’t be tragic if this could be bypassed by others, especially since I could quickly stop the integration into the database. Is there any way to implement this? (I tried it with IP Based Login, but with IP ranges it can’t be implemented, it has to be domains).

    mrtom414

    (@mrtom414)

    I don’t know of anything in WordPress that going to grant or deny access based on ip addresses.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Automatic login for specific referrers’ is closed to new replies.