Using custom IDP with WP
I got a client and they have a custom made IDP now they are moving to WordPress from Blogger and I made the full setup for the new WP site. Now they want the logins to be made from the IDP and not in the WP site. I tried many plugins but none of them worked. As I have some experience in plugin development I am planning to create a new plugin. But I have some doubts hope someone would help me.
When a user clicks login in WP he should be redirected to the IDP login page with some identifiers. How can I do this? (I guess customizing wp-login will work but I’m unable to find any hook for that)
Then once the user successfully logs-in in the IDP the user is redirected to a Callback URL with some identifiers. How can I create a callback page? Which hooks should I use?
Finally after the user reaches the callback page the script communicates with the server and gets the credentials for logging in. Here how to check if the user is already registered in WP (that is already logged-in at least once) and how to register if not. If yes how to login the user.
Thanks in advance!!!
EDIT: (Replying to @Rup's comment) The process of connecting and authorizing with the IDP is as follows.
Client - WP User - The user who logs in IDP - Identity Provider
- client requests to IDP with client token and pass
- IDP gives some identifiers for the session
- user is redirected by the client with the identifiers
- user logs-in with IDP
- user gets redirected with some new set of identifiers to the client's pre-specified callback URL
- client makes a request to the IDP with new identifiers requesting credentials
- IDP gives email ID and client and user-specific Username, Password
- client should login with the details given.
Topic signup user-registration plugin-development login Wordpress
Category Web