• Hello.

    Is it possible to create a sign up form that can work through WP REST API for visitors to be able to create accounts on my site?

    I can create such a form and use it to create new users. This works with wp_rest nonce when I am logged in as administrator.

    But if there is a visitor which is not logged in, the same form does not work of course. I think this is a question of authentication. Can you suggest a general idea how this can work? How can I allow visitors to be able to sign up with REST API?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I’m not fully up to speed with the REST API, so some of this may be off. It sounds like you are trying to implement something like user registration through the API. What the API provides is more akin to creating a user in the backend. When using cookie authentication, someone with create_users capability needs to be logged in, just as they do to add users in the backend.

    To have something closer to the registration process, you probably need a custom endpoint and an extended authentication method like oAuth or JSON Tokens so a non-privileged user can register and their user can be created under higher privileged credentials that remain inaccessible to the end user. I don’t know if these particular extended authorizations work that way. All I know is it will not work with cookie authentication.

Viewing 1 replies (of 1 total)
  • The topic ‘WP REST API for user sign up’ is closed to new replies.