Sarveshmrao most Flarum social login extensions are built on top of League's Oauth2 client library. If you implement an oauth2 server in your PHP app, you can then easily create a Flarum login extension by taking inspiration from one of the existing login providers. If your app is built with Laravel, Laravel Passport can be used to do this super easily.
If you're unable to expose an oauth2 server, it's still possible but more complicated as you will have to write all of the login verification code yourself, and we unfortunately don't have any documentation to help with that at the moment. The Telegram login extension was an example of a login extension that couldn't use oauth. Unfortunately it's now unmaintained and the code differs slightly from what you would need to do for the latest Flarum version.