• Extensions
  • PHP and WordPress Single Sign On (SSO) with optional JWT Addon

I have followed what the troubleshooting is, if you have any other way to contact you I will send you the code

    a month later

    Hello, can this plugin use the login function of my own website? I don't want to use the login of the Flarum system, I want users to log in to my website/or webpage, and jump back to Flarum after the login is successful. @maicol07

    Both websites are under the same domain name

      maicol07 I wrote this page on my own page with vue, my logic is 1. Jump from flarumt to the login page —> login page (vue) to get the user token, set the user token to the flarum website cookie ---> return to flarum website, but the user did not log in successfully

        BILLFuYiWei these are the default value for WordPress. Let me quickly explain you how this works (for more details, check the docs):

        1. This extension manages the Flarum login form and the authentication (when it is successful).
        2. You need an additional plugin installed on your website (currently only PHP and WordPress are available) that logins and redirects the user to Flarum

          BILLFuYiWei that doesn't work. You'll need to use a plugin for login to work. What is your server side language?

            BILLFuYiWei basically, when the user submits the form and you login him, you should call the website plugin to login into Flarum

            BILLFuYiWei oh well, Java isn't currently available as a plugin. However, you can write one following how the PHP plugin works.

              maicol07 Do you know there are other ways to allow users to log in? The background acquisition of user-token has been implemented. How to interact with Flarum to keep users logged in?

                BILLFuYiWei currently, the best way if you want to stick with user token is the one I use in the PHP and WordPress plugins.
                If you want a better system, there is my premium OIDC extension which allows you to login into every OIDC provider (language and framework agnostic). I don't know if you already use it, but you can setup a provider with one of these libraries (certified by OpenID): https://openid.net/developers/certified

                  BILLFuYiWei why? Your forum will be the client that requires authentication, while your java auth system will be the provider that gives authentication to the client (this is a very, very semplified summary)

                    maicol07 Java authentication system, in fact, users do not know that they are logged in from Flarum, it is logged in through our own business logic, after our own business logic login success, I will let users automatically register or automatically log in

                      maicol07

                      hello, i was wondering, i want to integrate a laravel website and flarum. With your SSO extension, after users are logged into my main website, will they also be logged into the flarum forum (on sub domain of the main website), or do they have to log in again into the forum?

                        djm once the Flarum extension is configured and the PHP plugin is set and integrated in your code, users will be automatically logged into Flarum

                        • djm replied to this.