fof / oauth
Allow users to log in with GitHub, Twitter, Facebook, Google, and more!
Fund package maintenance!
Website
Installs: 55 976
Dependents: 35
Suggesters: 0
Security: 0
Stars: 44
Watchers: 8
Forks: 17
Open Issues: 7
Type:flarum-extension
Requires
- php: ^7.4 || ^8.0
- flarum/core: ^1.8.1
- fof/extend: ^1.3.3
- league/oauth1-client: ^1.10.1
- league/oauth2-facebook: ^2.2.0
- league/oauth2-github: ^3.1.0
- league/oauth2-google: ^4.0.1
- omines/oauth2-gitlab: ^3.3.0
- wohali/oauth2-discord-new: ^1.2.1
Requires (Dev)
- flarum/phpstan: *
- flarum/testing: ^1.0.0
- dev-master
- 1.6.16
- 1.6.14
- 1.6.13
- 1.6.12
- 1.6.11
- 1.6.10
- 1.6.9
- 1.6.8
- 1.6.7
- 1.6.6
- 1.6.5
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.0
- dev-dependabot/npm_and_yarn/js/cross-spawn-7.0.6
- dev-di/full-ts
- dev-ds/improve-flex-layout
- dev-ds/do-not-override-loginmodal-body
- dev-provide-linkedin-oauth-and-fix-google-button
- dev-cw-fix-route-conflict
This package is auto-updated.
Last update: 2024-12-03 06:00:37 UTC
README
A Flarum extension. Allow users to log in with various OAuth providers
Bundled providers
By default these providers are included:
- Discord
- Github
- Gitlab
Permissions
This extension provides the ability to view the status of linked OAuth providers (intended for admin and/or moderator use). In order for this to function correctly, you must also set the permission Moderate Access Tokens
to at least the same group as you require for Moderate user's linked accounts
.
Additional providers
Additional OAuth providers are available for this extension. Here's a handy list of known extensions, let us know if you know of any more and we'll get them added!
Screenshots
Default provider settings example
Login/signup example with Github
, Twitter
, Twitch
and Google
enabled.
Installation
composer require fof/oauth
Updating
composer update fof/oauth php flarum cache:clear
Configuration
Translation
You can replace the text for the forum sign in buttons in two ways.
- Use
fof-oauth.forum.providers.<name>
to replace the name of the provider on the forum side - Use
fof-oauth.forum.log_in.with_<name>_button
to replace the entire button "Log In with " text
Extending
It is possible to add additional Providers
using an extender. See OAuth-Amazon for an example of how to accomplish this but basically:
- In your new extension, require
fof/oauth
as a dependency - Define a new
Provider
which extendsFoF\OAuth\Provider
- From your new extensions
extend.php
, register the provider(new FoF\OAuth\Extend\RegisterProvider(MyNewProvider::class))
- Provide the required translations under the
fof-oauth
namespace. See the linked example extension for details on which keys are required. - (optionally) Provide an admin panel link to
fof/oauth
for easy configuration. Again, see the linked example. - (optionally) Provide any CSS required to style your new login button. See the linked example.
Links
An extension by FriendsOfFlarum.