Download the PHP package import-ai/flarum-oauth-passport without Composer

On this page you can find all versions of the php package import-ai/flarum-oauth-passport. 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 flarum-oauth-passport

Flarum OAuth Passport

License Latest Stable Version Total Downloads Flarum

English | 简体中文

A standalone Flarum extension that enables OAuth2 authentication via Laravel Passport or any OAuth2-compatible server. No fof/oauth dependency required - full control over the OAuth flow with a custom callback route at /auth/passport.

screenshot

Features

Installation

Upgrade

Configuration

  1. Navigate to Administration > Extensions > OAuth Passport
  2. Copy the Redirect URL to your OAuth server's allowed redirect URLs
  3. Configure OAuth endpoints and credentials (see below)

OAuth Server Settings

Setting Description
Client ID Your OAuth application client ID
Client Secret Your OAuth application client secret
Scopes Comma-separated OAuth scopes (default: read)
Authorization Endpoint OAuth authorize URL (e.g., https://auth.example.com/oauth/authorize)
Token Endpoint OAuth token URL (e.g., https://auth.example.com/oauth/token)
User Information Endpoint User info URL (e.g., https://auth.example.com/api/user)

User Data Mapping

Configure the field names from your OAuth server's user info response:

Setting Default Dot Notation Support
User ID Field id Yes (e.g., data.user.id)
Display Name Field name Yes (e.g., data.name)
Email Address Field email Yes (e.g., data.email)

User Registration Options

Setting Description
Force User ID as Username Use OAuth user ID as Flarum username instead of allowing user to choose
Force Display Name Use OAuth display name instead of allowing user to choose
Force Email Address Use OAuth email and mark as verified
Update Display Name on Login Sync display name from OAuth server on each login
Update Email on Login Sync email from OAuth server on each login

Login Button Customization

Setting Default Description
Button Title "Login with Passport" Text displayed on the login button
Button Icon fas fa-passport FontAwesome icon class
Button Background Color #3B82F6 Hex color code
Button Text Color #ffffff Hex color code

Popup Settings

Setting Default Description
Fullscreen Popup false Use fullscreen popup for OAuth (ignores width/height)
Popup Width 580 OAuth popup window width in pixels
Popup Height 400 OAuth popup window height in pixels

Advanced Options

OAuth Flow

  1. User clicks "Login with Passport" button
  2. Extension redirects to OAuth server with state parameter (CSRF protection)
  3. User authenticates on OAuth server
  4. OAuth server redirects back to /auth/passport?code=xxx&state=xxx
  5. Extension validates state and exchanges code for access token
  6. Extension fetches user info and creates/logs in Flarum user
  7. Optional: Dispatches OAuthLoginSuccessful event for custom handling

Migration from Other Extensions

This extension includes built-in migrations for:

Simply install this extension and existing OAuth-linked accounts will continue to work.

Events

The extension dispatches FoF\Extend\Events\OAuthLoginSuccessful after a successful OAuth login, allowing other extensions to perform custom actions:

In-App Browser Support

For environments like WeChat where popups are blocked, the extension includes middleware that detects in-app browsers and provides a fallback mechanism for completing OAuth authentication.

Requirements

Links


All versions of flarum-oauth-passport with dependencies

PHP Build Version
Package Version
Requires flarum/core Version ^1.2.0
league/oauth2-client Version ^2.7
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 import-ai/flarum-oauth-passport contains the following files

Loading the files please wait ...