2 Replies Latest reply on Jun 22, 2016 10:52 AM by DDoughtie

    auto login via URL on Webdirect

    DDoughtie

      I've got a solution that will email an "audit" to people that have been assigned keys. I want to include a URL back to the key database via web direct. I want to create a low level user name and pw that only has access to one layout and they will respond whether or not they have the keys they are assigned.  I could provide them with user name and password in the email but I was wanting to know if it's possible to incorporate the user name and password in the url and such as "http://myserver/fmi/webd/MyDatabase?u=imauser, p="myPW", s="findUser"  or something similar to calling scrips etc when accessing other Filemaker solutions in Filemaker Go.

       

      Ideally they would also have their unique ID in the url string as well and it would trigger a script to fill in that ID or direct them to their record where their answer could be imbedded.

       

      Any ideas? All syntax attempts on my part have failed.

       

      The solution is currently on FMP 14 server.

        • 1. Re: auto login via URL on Webdirect
          mikebeargie

          First, always start with the documentation:

          https://fmhelp.filemaker.com/docs/14/en/fm14_webdirect_guide.pdf

           

          you're wasting your own time trying to guess parameters that don't exist.

           

          The WebDirect URL allows you to specify:

          -Filename

          -Return URL "homeurl" (where user goes when exiting webdirect)

          -Script name

          -Script parameter

          -Local variable

           

          This is covered on page 28 of the guide above.

           

          Providing someone with a URL containing a plain text username and password is insecure, that's why it's neither supported, nor recommended.

           

          You can generate a link containing a UUID that corresponds to a record in filemaker, perhaps in a users table. However the account that you use for WebDirect should be an anonymous, locked down login that only allows record access via the UUID you pass as the script parameter when logging in.

           

          Your url would look like:

          http://yourserver/fmi/webd#yourfile?script=login&parameter=theUUID

           

          Your "login" script could just be:

          Set Variable [ $$userID ; get(scriptparameter) ]

           

          And then set up your privilege set to grant access only when $$userID = yourtable::youridentifyingUUID

           

          This should at least get you started. You can set the file to log in with guest credentials and add this to the login script:

          If [ get(systemplatform) = 4]

             Re Login [ webdirectuser / pass ]

          Else

            Re Login

          End If

           

          That will automatically log you in on WebDirect, or prompt for user/password anywhere else.

           

          You can build on this to make it as complicated as you need.

          • 2. Re: auto login via URL on Webdirect
            DDoughtie

            Mike:

             

            I apologize for the slow response. Thank you for your guidance. It was the end of a long day and I actually looked at that page and overlooked what you pointed out. I was able to implement what I was trying to do with the client and it worked perfectly. Thanks you for your help.