WordPress uses cookie based authentication. When you log into wordpress using curl, wordpress is authenticating the server(which ran the curl script) & not your client. so when you visit wordpress using your browser(client), it’s not authenticated.
For the solution, you could use wordpress hooks to automatically authenticate the user to your site just after they authenticate themselves to wordpress. Then whenever a user comes to your site, you could just redirect them to wordpress login url for authentication.
Another solution is to override the authentication functions in wordpress. All of the authentication functions in wordpress are directly or indirectly pluggable. When you override them instead of checking if the user has the correct cookie set, you will check if the user has logged in on the other site (Maybe use a shared database?)
Related Posts:
- Can I programmatically login a user without a password?
- What is $interim_login?
- Adding extra authentication field in login page
- What exactly is ReAuth?
- Login members using web services
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- How to pass users back and forth using session data?
- Need to execute a cron job
- how to update current logged user username
- Validate Custom Login field
- Calling wp_signon doesn’t log the user in
- How to implement Google reCaptcha without installing a plugin?
- Is it possible a one click user registration with Facebook or Twitter (or other Social Networks)?
- Are there ways of logging in that bypass wp-login.php altogether?
- How to display username and password after registration
- Two factor authentication
- How to generate “WP_Error” Object for user login?
- Allow Access to Home Page and Login Screen but Nothing Else (unless logged in)
- Where is the php file, that does the checks for login information?
- I want login using email not username wordpress front end
- Reloading page with a query string upon login for admins
- authenticate user without redirecting
- Multiple issues with Ajax login function due to browsers and cookies
- How to post frontend login form to a different authentication script from wp-login?
- Custom user roles are unable to login
- Using WordPress login for a non word-press website
- Extend Cookie with auth_cookie_expiration not working
- Can we start session from another php site to wordpress blog site?
- Opening protected page with cookie?
- Handle POST request sent from an external site for login?
- External Authentication
- Login and register by API
- Custom login form
- Stop WordPress from logging me out (need to keep me logged in)
- Customize wp_new_user_notification_email()
- Login email after registration never sent or received
- Using `auth_redirect` : keeps asking me to login even when I’m logged in
- How can I retrieve the username and password from my WordPress installation?
- User Directory without a Plugin
- User logon by using mobile number [closed]
- Pre checking condition before login
- Custom Connect to Facebook, problem logging in/logging out
- Use WordPress with a custom OAuth2 provider
- Redirect after empty login username and password
- WordPress Login page trashed
- Change Favicon on Login Screen?
- Customizing the WordPress login form
- wp-login gives 404 error, but wp-admin is working fine
- Login error redirecting to wp-login page
- Private page protected with username and password
- Password reset – Disabled for LDAP accounts
- Replace dash with space in username on login
- Autologin only working the second time
- Completely replacing the login form
- Why wp_update_user doesn’t update user_activation_key on users with apostrophes in their email?
- Forgot Password/ Password Reset Page does not exist
- WordPress on Apache behind nginx using letsencypt issue with loginizer/limit login attempts
- Auto login between word press subdomain and a .net website
- Permit Login if table row exists
- Custom Login form from WordPress site to non-WordPress site
- WordPress error on log out ‘Not Permitted’ and can’t log out
- How can I change the email sender name from wordpress to (myblogname) on the “lost password” email?
- Changed primary domain and now wordpress login won’t work
- Add logout link when logged in, make it disappear when logged out?
- Forcing frontend login with UI switch
- Sidebar login widget with error print, returns an error
- How do you manage your pages or functions that require logged-in users?
- Login without Password
- Exclude login page from custom maintenance code
- Change default login auth
- I can’t access my WordPress dashboard – shows Warning message [closed]
- Access log “POST /wp-login.php HTTP/1.0” 400
- Are login functions considered part of the WP backend?
- SQL – Remove All The Users and Create A New User With Admin Role Via PhpMyAdmin
- Can I protect a type of content site-wide with a single password?
- Sign in with social media accounts without creating a WP account [closed]
- How are all users now set to inactive?
- How to create separate login for authors/moderators/subscribers?
- Unable to login into WordPress 401
- Google reCaptcha on WP login page
- Recovering log in information
- Log in only by email and no username
- Modify wp-login.php Labels Conditionally Based On Referring URL
- Stop customers and subscribers from login to dashboard
- Why does /wp-admin login send me to this landing page?
- Why does WordPress use cookies for /wp-admin and /wp-content/plugins for non-admin users [duplicate]
- Locked out of WordPress admin area [closed]
- How to dequeue the default CSS styles on the wp-login.php page?
- confirmation email is send from my local host registration of a user but mail will not display in there email account?
- Server error after log in
- Changed from HTTP to HTTP, can login no longer login
- Hide wp-login.php but not the widget
- Without user loging inner page is disable wordpress [duplicate]
- WordPress and Magento: let WordPress manage user registration and logins?
- How to change the login URL
- Click on banner to register to the blog
- issue with my wp site after login
- How can I automatically change directory on ssh login?
- How to create a fully functional user registration in WordPress?
- How to remove without touching the pluggable.php the wordpress_logged_in cookie to show the username on login?