forum-oauth-center/README.md
2023-10-02 07:04:13 +08:00

2.1 KiB

OAuth Center

License Latest Stable Version Total Downloads

A Flarum extension. Allow user to authorize the third clients

Installation

Install with composer:

composer require foskym/flarum-oauth-center:"*"

Updating

composer update foskym/flarum-oauth-center:"*"
php flarum migrate
php flarum cache:clear

Usage

setting

Snipaste_2023-10-02_06-15-33

create a client

Snipaste_2023-10-02_06-15-52

set scope for your resources (user.read is default scope)

Snipaste_2023-10-02_06-16-06

uri

authorize: /oauth/authorize

token: /oauth/token

resource(user): /api/user

do it as normal OAuth client

Snipaste_2023-10-02_06-16-31

get access token after authorized

Snipaste_2023-10-02_06-17-00

using token to access resources (get or header)

Snipaste_2023-10-02_06-17-29 Snipaste_2023-10-02_06-17-42