• Resolved joepske83

    (@joepske83)


    Hey there!

    We are building a custom authentication, which only restricts people with a code they get with their product.
    So we want:
    – our homepage to be a screen with input text which sends the code to wordpress where it is checked in a custom post type called codes
    – We want that call to give us back some information like name and age, also stored in the code cpt

    Is something like this possible? Couldnt find building custom data endpoints in the manual.

    Thanks in advance.

    Joep

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Mathieu Le Roi

    (@mleroi)

    Hi,

    Yes you should be able to achieve what you want by using the following:

    – for the custom homepage containing your authentication code form you can get information from this tutorial: https://uncategorized-creations.com/3500/create-a-custom-homepage/

    – then to send custom data (your code) to the server, handle this data on server side and send feedback data back to the app there is the “liveQuery” endpoint. Unfortunately it is not documented yet but we have this snippet that shows how to use it: https://gist.github.com/uncatcrea/ae163cc0d2f298d5a36a670b3855ad0c

    – to store your user’s data on app side, you will probably create a “CurrentUser” JSON object in your functions.js, then this CurrentUser is updated from the data sent from the code authentication liveQuery endpoint answer.

    Hope this helps,
    as explained here please reach us at support[at]uncategorized-creations.com for any further questions about this specific need, and we will then post back here any information that can be useful to others.

    Regards

    Thread Starter joepske83

    (@joepske83)

    Absolutely what i needed, liveQuery works great, missed that snippet, maybe good to point to it in your docs, because it works like a charm.

    Thanks for the fast and clear answer.

    Joep

    Plugin Contributor Mathieu Le Roi

    (@mleroi)

    Great that it worked well for you.

    The liveQuery usage snippet is now on our website for better findability: https://uncategorized-creations.com/4416/custom-data-endpoint-using-livequery-webservice/

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom data endpoint’ is closed to new replies.