Direct Login for Users on FarmOs

Its been less than a month, since i started using farmOs. I am really enjoying it .

I would like help on which parameters are needed to have a direct login for users. I am encountered a scenario where i need to share a link containing username and password directly to farm viewers as a single url. The use case is to avoid sending emails to farm viewers (e.g. a donor institution) but rather share a single link

e.g for farm name nileCado, i am considering something like$username=testview&password=Pys#!iwe

where username = testview and password =Pys#!iwe

I would like such url to land directly to the home page of that particular user. Thank you

1 Like

Hi @nilecado - welcome to the farmOS community forum!

There probably isn’t a way to do exactly what you’re describing.

farmOS (actually Drupal underneath) does have a concept of “one-time login links”, which include a secret token that will automatically log the user in. It looks something like this:


An additional ?destination parameter can be appended, which will redirect the user to a different page after logging them in. eg:


This is the same kind of link that the “Password reset” form will send via email when you use the form at https://[my-farmOS-domain]/user/password.

However, there isn’t any way to generate those links from within farmOS. If you were self-hosting farmOS, and had access to the root admin user, then you could generate these from the command line using the drush uli command. However, in the Farmier hosted environment you do not have this level of access (for obvious security reasons).

So, I’m not sure there’s a way to do what you want. You can take a look at the password reset form, though. If you type in the user’s email address that you want to receive a link there, it will send them an email. You will never see the link yourself, however (again, for security reasons).

Hope that helps!

Hello @mstenta ,

Thank you for the response. I managed to get a worked a round, by incorporating the login page into the third-party website and then providing a user name and password for direct login The intended user now copies the username and password to login in.

For now this serves my purpose.

Kind Regards

1 Like