This showed up as a notification due to the upvote. Here’s how I solved it.
- The endpoint coded in the app that I am supposed to authenticate with prepares the token.
- The token has to be in the specified format.
- It then should be base 64 encoded and hash encrypted.
- The
wp_init
handler should be used to handle the POST request sent by the endpoint, to extract the token. - The key will be shared via some other way, used for decryption.
- Once the token is extracted, compare it against a locally generated token with the same information.
- Store it in a cookie, and check it on every page access. You can expire it after a while or keep on increasing the time slice on every page access.
The endpoint could be in any language. Also this is the general flow of it, you can use it anywhere you want.
Related Posts:
- Change GitHub Account username
- Google OAuth 2 authorization – Error: redirect_uri_mismatch
- What are the main differences between JWT and OAuth authentication?
- How to use OAuth authentication with REST API via CURL commands?
- Create API for single sign-on with 3rd party site
- How to validate a user from ouside wordpress/php?
- Override user authentication with external credentials
- why does WordPress need two cookies for auth/login
- Extend WordPress (4.x) session and nonce
- How to use WordPress authentication on non-WordPress page?
- How does ifttt.com authenticate a supplied WordPress account
- Using JWT to authenticate a user with an external system?
- Storing Dropbox Authentication?
- WordPress as a OAuth Provider
- Friendica integration using wordpress authentication
- Authentication for wordpress website
- How to leverage authentication outside of WordPress?
- How do I execute a wp_remote_get call using NTLM authentication?
- Outgoing proxy connection problem
- WordPress SSO with MemberPress
- Create Session with JWT
- Authenticated request to WP REST API V2 returning 403 error on /users/me [closed]
- Single sign-on: wp_authenticate_user vs wp_authenticate
- Set authentication cookies to be shorter but then extend with every page load
- WordPress user Authentication
- WordPress asking for FTP details when installing plugins
- How to password protect media library files (PDF)?
- How to use Azure AD for authentication?
- implement authentication and authorization to user
- for a role-protected page, programmatically login user and load page
- Single sign on for several website domains
- guest authentication
- wordpress 3.9 remote token auth
- How to set up Shibboleth authentication for a MU site
- Login after “Read More” then return to article
- How to make WordPress use authentication from Parent Site
- auto logout user when user logout on one of the opened tab
- How can I have authenticated WordPress users automatically sign into Moodle?
- Facebook Registration Tool: how to use in WordPress? [closed]
- Requiring Authentication for Parts of WordPress Site
- WooCommerce OAuth 1.0 + JWT authentication with JS/React
- Authenticating users with usermeta fields
- Getting Authentication required popup
- How can LDAP/Active Directory be integrated in WordPress?
- Authenticate Subdomain
- How to create new users with JWT Auth Plugin?
- Mirgrating a user at signon
- Automate WordPress Login
- Application to Website authentication
- How to authenticate using JWT by ajax?
- Open authenticed WordPress page from mobile app
- Access to customer profile with pin code
- WP link for reset password is not received
- How to make an other web app can login with wordpress authentication?
- How to add additional factor to wordpress authentication
- Adding a “Sign In/My Account” link to an external app
- Check if user is logged in, inside php file in template directory
- Handle POST request sent from an external site for login?
- Connect my WordPress site users to my public site account without showing my public site credentials
- WordPress Multisite and site speed and scaleability
- Blocking the direct access to images in the upload folder WordPress
- Can you pass user/pass for HTTP Basic Authentication in URL parameters?
- What is the difference between authentication and authorization?
- wp_signon by user’s login by their particular role
- Unable to login with correct password
- Authentication versus Authorization
- What is an Endpoint?
- Git push results in “Authentication Failed”
- Git push results in “Authentication Failed”
- Git push results in “Authentication Failed”
- nodejs – error self signed certificate in certificate chain
- Google OAuth 2 authorization – Error: redirect_uri_mismatch
- What ports need to be open for TortoiseSVN to authenticate (clear text) and commit?
- OpenAM error 500 “Unable to do Single Sign On or Federation” when browser loads successURL
- OpenAM error 500 “Unable to do Single Sign On or Federation” when browser loads successURL
- How do I remove documents using Node.js Mongoose?
- PG::ConnectionBad: fe_sendauth: no password supplied
- PostgreSQL error: Fatal: role “username” does not exist
- Authenticating in PHP using LDAP through Active Directory
- How to check if a user is logged in (how to properly use user.is_authenticated)?
- How to bypass (deprecated) reCAPTCHA V1?
- Automatic WordPress Login of Logged In ClickFunnels User
- CAS authentication for WordPress
- Can I programmatically login a user without a password?
- How to: Make JWT-authenticated requests to the WordPress API
- SSO / authentication integration with external ‘directory service’
- How to Change the Default Home Page for the WordPress Dashboard?
- How do I require authorization / login to view a specific set of posts / pages?
- What is $interim_login?
- Set up WP Authentication from External API
- Adding extra authentication field in login page
- What exactly is ReAuth?
- WordPress auto login after registration not working
- Login members using web services
- How to check username/password without signing in the user
- WordPress REST API – Permission Callbacks
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- How to pass users back and forth using session data?
- How to secure or disable the RSS feeds?
- custom XMLRPC method plus authentication of user & WooCommerce order