Merge branch 'issue-449-auto-token-fetch' into 'develop'
#449 - fix auth token fetch issue Closes #449 See merge request pleroma/pleroma-fe!696
This commit is contained in:
commit
66e60572bc
1 changed files with 6 additions and 1 deletions
|
@ -561,7 +561,12 @@ const fetchOAuthTokens = ({credentials}) => {
|
||||||
|
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
headers: authHeaders(credentials)
|
headers: authHeaders(credentials)
|
||||||
}).then((data) => data.json())
|
}).then((data) => {
|
||||||
|
if (data.ok) {
|
||||||
|
return data.json()
|
||||||
|
}
|
||||||
|
throw new Error('Error fetching auth tokens', data)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const revokeOAuthToken = ({id, credentials}) => {
|
const revokeOAuthToken = ({id, credentials}) => {
|
||||||
|
|
Loading…
Reference in a new issue