Title: WP Admin auth
Last modified: November 26, 2018

---

# WP Admin auth

 *  [botoxparty](https://wordpress.org/support/users/adamhammad/)
 * (@adamhammad)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/wp-admin-auth/)
 * Hey,
 * I was wondering if it was possible to be able to auth using JSON API User, and
   also have those cookies work to access /wp-admin ?
 * It doesn’t automatically do that for me, even if its coming from the same domain.
 * Cheers

Viewing 1 replies (of 1 total)

 *  Plugin Author [Ali Qureshi](https://wordpress.org/support/users/parorrey/)
 * (@parorrey)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/wp-admin-auth/#post-10924852)
 * you can but to login for web app, you just have to add another endpoint in controller/
   User.php file. it will redirect you after logging in via endpoint.
 * This will set the cookie for you:
 * `wp_set_auth_cookie($user_id);`
 * This line will redirect you
    `wp_redirect( get_site_url(), 301 ); exit;`
 * Plz see this thread.
 * [https://wordpress.org/support/topic/login-to-website-1/?replies=6#post-7787922](https://wordpress.org/support/topic/login-to-website-1/?replies=6#post-7787922)

Viewing 1 replies (of 1 total)

The topic ‘WP Admin auth’ is closed to new replies.

 * ![](https://ps.w.org/json-api-user/assets/icon-256x256.png?rev=1965790)
 * [JSON API User](https://wordpress.org/plugins/json-api-user/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api-user/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api-user/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api-user/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api-user/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api-user/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ali Qureshi](https://wordpress.org/support/users/parorrey/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/wp-admin-auth/#post-10924852)
 * Status: not resolved