Skip to content

Commit

Permalink
Updated README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakyeRU committed Jan 11, 2022
1 parent 5d33ae9 commit e2e7736
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ php artisan larascord:install
```
### Step 3: Follow Larascord's instructions
* You can get your Discord application's `CLIENT ID` and `CLIENT SECRET` from the "OAuth2" tab of your application.
* ![](https://i.imgur.com/YJnM4H5.png)
* The `REDIRECT URI` has to be the **same** as the one you provided in your application's OAuth2 redirect.
![](https://i.imgur.com/YJnM4H5.png)

Your application should now be able to authenticate users using Discord.

Expand All @@ -62,11 +61,19 @@ _You shouldn't need these commands as the configuration is automatically publish

---
# Larascord Routes
> 💡 These routes can be found in the `routes/auth.php` file.
| Route Name | URI | Description | Action | Method |
| ---------- | ---- | ----------- | ------ | ------ |
| `login` | `/login` | Redirects the user to Discord's OAuth2 authorization page. | REDIRECT | `GET` |
| `logout` | `/logout` | Invalidates the current session. | `AuthenticatedSessionController@destroy` | `POST` |
| `larascord.login` | `/larascord/callback` | Callback route for Discord OAuth2 authentication. | `DiscordController@handle` | `GET` |
| `larascord.refresh_token` | `/larascord/refresh-token` | Redirects to the login page. (Used to access secure parts of the application through the middleware `password.confirm`.) | REDIRECT | `GET` |

# Possible Errors
## `Invalid OAuth2 redirect_uri`
This error occurs when your `redirect_uri` is not listed in your application's OAuth2 redirects.

If you are sure your `redirect_uri` is correct, make sure that `APP_URL` is correct in `config/app.php`.

---

If you encounter any other error(s), please open an issue on [GitHub](https://github.com/JakyeRU/Larascord/issues/new/choose).

0 comments on commit e2e7736

Please sign in to comment.