KjayCopper have you checked the Troubleshooting page on the docs?
https://docs.maicol07.it/en/flarum-sso/plugins/php#troubleshooting
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
KjayCopper yes, you can find me on Telegram (@maicol07
)
- Edited
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
BILLFuYiWei hi, yes, that's the purpose of this extension
maicol07
about this links https://example.com/login.php?action=register
I don't know how this login.php works? I am very confused,
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):
- This extension manages the Flarum login form and the authentication (when it is successful).
- 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?
maicol07 I see. I thought it could jump to any web page 。。。。
maicol07 The front-end language is VUE and the back-end language is JAVA
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
maicol07 I've read about this before and it doesn't feel like it applies to my forum.
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