Code Monkey home page Code Monkey logo

auth-fluxbb's Introduction

FluxBB 1.5 External Authentication

A package that allows for external authentication with FluxBB 1.5, integrating directly with the Laravel 4 framework.

Installation

Step 1: Install package through Composer

Add this line to the require section of your composer.json:

"franzliedke/auth-fluxbb": "1.0.*"

Alternately, you can use the Composer command-line tool by running this command:

composer require franzliedke/auth-fluxbb

Next, run composer install to actually install the package.

Step 2: Register the service provider

In your Laravel application, edit the app/config/app.php file and add this line to the providers array:

'FranzLiedke\AuthFluxBB\AuthFluxBBServiceProvider',

Step 3: Configure the location of your FluxBB installation

In order to read some configuration values, the path to your FluxBB installation needs to be configured.

To copy the package configuration file, run this command:

php artisan config:publish franzliedke/auth-fluxbb

You can then edit app/config/packages/franzliedke/auth-fluxbb/config.php. Change the path option to point to the root directory of your FluxBB installation. Make sure it ends with a slash.

Step 4: Enable the new authentication adapter

In your application, edit the app/config/auth.php file and set the driver option to "fluxbb1", so that it looks like this:

'driver' => 'fluxbb1',

Step 5 (optional): Set up views for resetting passwords

Follow the default Laravel instructions.

The reset system will work almost out of the box. Just change the reset callback function in the generated controller so that sha1() is used rather than Hash::make(), and use a DB query rather than Eloquent's save().

Note that this does not use the same reset process as in FluxBB, which simply generates and sends new passwords to the user rather than letting the user choose.

Usage

Once installed, you can use the authentication feature of Laravel as you always do, with Laravel magically using FluxBB's database and cookie behind the scenes.

Note: This package will not work if your FluxBB installation uses a SQLite2 database, as this database type is not supported by Laravel.

auth-fluxbb's People

Contributors

bvangraafeiland avatar dobbyloo avatar franzliedke avatar lbausch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

auth-fluxbb's Issues

Update for Laravel 4.2

I cannot update my Laravel installation to 4.2 due to conflicting Symphony dependencies:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install laravel/framework v4.2.1
    - Conclusion: remove franzliedke/auth-fluxbb v1.0.4
    - Installation request for laravel/framework 4.2.* -> satisfiable by laravel/framework[v4.2.0, v4.2.1].
    - Installation request for franzliedke/auth-fluxbb 1.0.4 -> satisfiable by franzliedke/auth-fluxbb[v1.0.4].
    - franzliedke/auth-fluxbb v1.0.4 requires symfony/security 2.4.* -> satisfiable by symfony/security[v2.4.5, v2.4.0, v2.4.1, v2.4.2, v2.4.3, v2.4.4, v2.4.6].
    - Can only install one of: symfony/security[v2.5.0, v2.4.0].
    - Can only install one of: symfony/security[v2.5.0, v2.4.1].
    - Can only install one of: symfony/security[v2.5.0, v2.4.2].
    - Can only install one of: symfony/security[v2.5.0, v2.4.3].
    - Can only install one of: symfony/security[v2.5.0, v2.4.4].
    - Can only install one of: symfony/security[v2.5.0, v2.4.5].
    - Can only install one of: symfony/security[v2.5.0, v2.4.6].
    - Can only install one of: symfony/security[v2.5.0, v2.4.5].
    - laravel/framework v4.2.0 requires symfony/security-core 2.5.* -> satisfiable by symfony/security[v2.5.0], symfony/security-core[v2.5.0].
    - Conclusion: don't install symfony/security-core v2.5.0

How to use fluxbb with symfony 2?

Hello,

I'm working on a symfony project and I would like to use the auth of fluxbb with my symfony project and also retrieve some informations of forums and topics.

For example, I would like to be able to log on my website and i will also be logged on my fluxbb.

Regards.

Siza

Support for password reminders

For my current project, it's desirable to have a "forgot password" link on the main site, however this is currently not supported using Laravel's Password facade. I would suggest either having this User class extending Eloquent, or also implementing RemindableInterface (you can just use the trait for the email method).

Then, all that needs to be done is a custom implementation of ReminderRepositoryInterface, and I think just extending DatabaseReminderRepository and overriding a couple of methods should be sufficient there, the major difference being that FluxBB doesn't use a separate table for reminders but puts them in the users table instead.

I would be glad to implement this myself, but just checking here whether it wasn't already on the list.

sentry support

Hi,

Great plugin! Does this however also work with Sentry from Cartalist?

Logging in through Laravel doesn't login forum

Hi

I have a site that I am trying to integrate with fluxbb using this connector (and Laravel 4.2).

When I login on the site, it seems to work perfectly fine, and Auth::User() returns the fluxbb user. However, wehn I then browse to the forums, it doesn't show as logged in at all, and I have to login again. Oddly, however, logging out from the main site, does log out of the forums, and vice versa.

Logging in through the forums also works and then shows the site as logged in.

The way that I am doing the login is using Auth::attempt($credentials) where $credentials is an array of inputs.

Do i need to do something else with teh response from this for the forums to realise that the user has logged in this way?

If you need an example URL, I can PM/Email you a link to it.

Question regarding migrations

For testing purposes, would the migrations from the fluxbb/core repository yield the same database as when installing flux 1.5?

Take online timeout setting into account

We currently let the cookies expire after 1800 seconds, which is the FluxBB standard setting for the online timeout.

That is configurable, though, and since the FluxBB login script takes this into account, this library should also.

This will require reading the FluxBB config (either from database or cache).

Cookie lifetime

When logging in though this driver the FluxBB cookie has a static lifetime of 30min (or 2 weeks if remember == true).
This lifetime is never updated if the user interacts with the page. (= the browser deletes the cookie 30min after the login regardless if the user is idle or not)

When logging in directly in FluxBB the cookie has a lifetime of 0. ("until the end of the browser session")

Could you add an option to create a real session cookie instead of a 30min-cookie or an option to enable the refreshing of the cookie lifetime? (like laravel does with its session cookie - the 30 minutes are reset on each request)

Laravel 4.1 support

Hi
Is there any support for Laravel 4.1 planned? I am keen to try FluxBB, but only if I can integrate my existing users smoothly.
Thanks

Unsupported Operations since laravel 4.1.28

after updating laravel framework to 4.1.28 the new UserProviderInterface obviously requires implementation of additional methods.

Error Message

Class FranzLiedke\AuthFluxBB\UserProvider contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Illuminate\Auth\UserProviderInterface::retrieveByToken, Illuminate\Auth\UserProviderInterface::updateRememberToken)

How to make auth-fluxbb work under Laravel 3?

Hey.

My website works under laravel 3, and I really appreaciate any help of getting this auth to work with my installation of flux with rest of my site.

This would work with L3? If no, how to adapt it to L3?

[Laravel 4.1] Cookies are encrypted

In Laravel 4.1, all cookies are automatically encrypted by the Stack middleware Illuminate\Cookie\Guard. We obviously don't want to disable this for all cookies, so there should be a way to create just one unencrypted cookie.

I'll investigate...

Logins across sub domains

Hi

Not sure if this is a bug with the Auth driver, or Laravel itself, but I'm trying to access a sub-domain (admin.domain.com) whilst logged into the main site (domain.com), however, when I hit the admin sub domain, Auth::User() returns false, not the user that is logged in on the main site.

I've got my 'domain' setting in session.php set to 'domain.com', tried with/out the leading . but neither seems to work.

Is this a potential issue within auth-fluxbb?

For a bit more info, when I view cookies in a cookie editor, I see 2 cookies. One for .domain.com with a cookie name of "laravel_session" (what is set in my session.php) and then a seperate session for just domain.com (no leading .) with a cookie name of pun_cookie_9170ad.

This cookie name (pun_cookie_9170ad) is actually what's stored in my forum/config.php as $cookie_name. Do i need to alter the forum cookie name or laravel cookie name, so that they both match?

Do I also need to change the cookie domain so that they both match? If so, with or without the leading full stop?

TIA.
Steve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.