Skip to content

Commit

Permalink
add config via config panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Over2Craft-mc committed Aug 28, 2021
1 parent e03f8fe commit d47b001
Show file tree
Hide file tree
Showing 21 changed files with 295 additions and 3,166 deletions.
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@

This Azuriom plugin allow users to authenticate thought Discord OAuth2 API.

## How does it works
This plugin use Discord OAuth2 to authenticate users.
Discord ID is stored in the field `game_id` of the table `users`
when a user try to login for the first time via Discord.
The user will be prompted to enter his name
when login in for the first time,
If the user skip this step the discord ID will be used as the name.

Note : Discord ID is stored in this format `discord-$discord-id`

The Discord ID will be then used to authenticate future login attempt

## Installations

### Add a login via discord button in your template
Expand All @@ -33,10 +21,10 @@ You can also use the admin panel to add a navigation button, but it may be a bit

### Register a discord app and fill credentials
* Register a Discord application here https://discord.com/developers/applications
* Fill `client_id` and `client_secret` in `plugins/discord-auth/src/Controllers/DiscordAuthHomeController.php`
* Go to plugin's settings and fill client_id and client_secret

### Update depedencies
`composer require martinbean/socialite-discord-provider:^1.2`
Go to `plugin/discord-auth` and run `composer update`

# Todo
* [ ] Configuration via panel admin
* [x] Configuration via panel admin
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@
},
"require": {
"martinbean/socialite-discord-provider": "1.2"
},
"replace": {
"guzzlehttp/guzzle": "*",
"psr/log": "*",
"symfony/http-foundation": "*",
"laravel/socialite": "*",
"illuminate/support": "*",
"facade/ignition-contracts": "*"
}
}
Loading

0 comments on commit d47b001

Please sign in to comment.