forked from AkkomaGang/admin-fe
Added 'admin' & 'push' OAuth scopes.
Disabled PleromaFE login feature since PleromaFE shouldn't request admin scope.
This commit is contained in:
parent
4d7889d76a
commit
e9b62693de
4 changed files with 4 additions and 2 deletions
|
@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- **breaking** PleromaFE login feature relies on `admin` scope presence in PleromaFE token (older versions of PleromaFE don't support it)
|
||||||
- Moves emoji pack configuration from the main menu to settings tab, redesigns it and fixes bugs
|
- Moves emoji pack configuration from the main menu to settings tab, redesigns it and fixes bugs
|
||||||
- `mailerEnabled` must be set to `true` in order to require password reset (password reset currently only works via email)
|
- `mailerEnabled` must be set to `true` in order to require password reset (password reset currently only works via email)
|
||||||
- Remove fetching initial data for configuring server settings
|
- Remove fetching initial data for configuring server settings
|
||||||
|
|
|
@ -8,7 +8,7 @@ export async function loginByUsername(username, password, authHost) {
|
||||||
const verifyHost = user.authHost === authHost
|
const verifyHost = user.authHost === authHost
|
||||||
const data = {
|
const data = {
|
||||||
'token_type': 'Bearer',
|
'token_type': 'Bearer',
|
||||||
'scope': 'read write follow',
|
'scope': 'read write follow push admin',
|
||||||
'refresh_token': 'foo123',
|
'refresh_token': 'foo123',
|
||||||
'me': 'bob',
|
'me': 'bob',
|
||||||
'expires_in': 600,
|
'expires_in': 600,
|
||||||
|
|
|
@ -9,7 +9,7 @@ export async function loginByUsername(username, password, authHost) {
|
||||||
data: {
|
data: {
|
||||||
client_name: `AdminFE_${Math.random()}`,
|
client_name: `AdminFE_${Math.random()}`,
|
||||||
redirect_uris: `${window.location.origin}/oauth-callback`,
|
redirect_uris: `${window.location.origin}/oauth-callback`,
|
||||||
scopes: 'read write follow'
|
scopes: 'read write follow push admin'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
<el-button :loading="loading" class="login-button" type="primary" @click.native.prevent="handleLogin">
|
<el-button :loading="loading" class="login-button" type="primary" @click.native.prevent="handleLogin">
|
||||||
{{ $t('login.logIn') }}
|
{{ $t('login.logIn') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<!-- Note: PleromaFE login feature relies on admin scope presence in PleromaFE token (older versions of PleromaFE don't support it) -->
|
||||||
<el-button v-if="pleromaFEToken" :loading="loadingPleromaFE" class="login-button" type="primary" @click.native.prevent="handlePleromaFELogin">
|
<el-button v-if="pleromaFEToken" :loading="loadingPleromaFE" class="login-button" type="primary" @click.native.prevent="handlePleromaFELogin">
|
||||||
{{ $t('login.logInViaPleromaFE') }}
|
{{ $t('login.logInViaPleromaFE') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
Loading…
Reference in a new issue