Download the PHP package burnthebook/craft-flarum-sso without Composer

On this page you can find all versions of the php package burnthebook/craft-flarum-sso. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-flarum-sso

Flarum SSO for Craft 4

Adds Single Sign On (SSO) for Craft 4 as a parent with Flarum as child

Requirements

This plugin requires Craft CMS 4.5.0 or later, and PHP 8.0.2 or later.

This plugin also requires the Flarum SSO Extension installing and configuring on your Flarum installation.

Installation

You can install this plugin from the Plugin Store or with Composer.

From the Plugin Store

Go to the Plugin Store in your project’s Control Panel and search for “Flarum SSO for Craft 4”. Then press “Install”.

With Composer

Open your terminal and run the following commands:

Configuration

To configure the plugin, head on over to Settings > Plugins (Section at bottom of page) > Flarum SSO for Craft 4 and click the icon.

There are three required settings:

Flarum URL The URL to your Flarum installation. This is recommended to be a subdomain of your Craft CMS installation, e.g. https://discuss.craftcms.com

Flarum API Key _The API key you manually inserted into your Flarum installations apikeys database table

Forum SSO Cookie - Domain The root domain for the SSO Cookie. If your Craft CMS installation is on www.craftcms.com, and your Flarum installation is on discuss.craftcms.com, you would set this to 'craftcms.com'

The rest of the settings on the Settings page are optional and pre-configured to work correctly with the maicol07/flarum-ext-sso package that you will be installing on your Flarum installation, and so can be left as-is unless you need to configure the cookie settings for security purposes.

Usage

This plugin automatically hooks into CraftCMS's login, register and logout events in order to replicate these events on the Flarum side of things. E.g. you log in to CraftCMS, you're logged into Flarum. You create an account on CraftCMS, your account is created on Flarum.

Additionally, if you have pre-existing users on Craft CMS that don't exist in Flarum, upon logging into your Craft CMS site after this plugin has been installed, a user will be created for them on Flarum automatically - they will not need to sign up again.

Troubleshooting / FAQs

Q: I am not logged into Flarum after I am logged into Craft

A: Ensure your root domain matches, due to cookies it is best to have the Flarum forum on a subdomain and the Craft CMS either on another subdomain or a root domain.

Additionally, ensure your cookie domain is set up within the Plugin Settings as detailed within the Configuration section.

For Example: If your Craft CMS installation is on craftcms.com, you'd want to have your Flarum installation on discuss.craftcms.com and your cookie domain set up as "craftcms.com" in Plugin Settings

Q: I am recieving "Authentication failed: Unauthorized" upon logging in or creating accounts in Craft CMS even though I know the username and password are correct

A: Ensure your API Key is correctly set up within the Plugin Settings as detailed within the Configuration section. Ensure there are no trailing or leading spaces or extraneous characters. _Optionally, ensure your API Key set in the Flarum api_keys table (has to be inserted manually) is for an Administrator user._

Q: I want to see more detailed logs of what the API is returning rather than the friendly error messages output by the plugin

A: Sure, we log all raw error responses to the storage/logs/flarum-sso---

.log file

Q: How do I log in as an admin to Flarum?

A: Because of how maicol07/flarum-ext-sso and Flarum works, you will need to have the same username and password for both your Flarum installation and your Craft CMS installation for your administrator account. Then, when you log into Craft CMS as an administrator, you will automatically be logged into your administrator account on Flarum. This is important to note when setting up your Flarum installation for the first time.

Q: Can all of my Craft CMS users go into a usergroup within Flarum to indicate that they came from CraftCMS?

A: This functionality (or any groups functionality) is not currently supported, but if there is enough interest we can consider it.

Q: Can my users still log into Flarum without a Craft CMS account?

A: No, your users will require a Craft CMS account to log into Flarum once this plugin is installed to Craft CMS and maicol07/flarum-ext-sso is installed to Flarum. Craft CMS becomes the parent application and Flarum becomes the child application, so all user management should be performed within CraftCMS.

Q: What if I have existing users within Flarum?

A: This plugin is intended for use with brand new Flarum installations as of plugin version 1.0.0. If there is enough interest, in future we may add logic that checks if the user already exists within Flarum and create the user within CraftCMS, but as of now we only check if the user exists within Craft CMS and if they do and have authenticated with the correct credentials, create them within Flarum, and authenticate them.


All versions of craft-flarum-sso with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.2
craftcms/cms Version ^4.5.0|^5.0.0
guzzlehttp/guzzle Version ^7.8
josantonius/cookie Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package burnthebook/craft-flarum-sso contains the following files

Loading the files please wait ...