Fix oauth url
This commit is contained in:
parent
f671adae37
commit
63ad08050e
@ -5,7 +5,7 @@ const getOrCreateApp = ({oauth, instance}) => {
|
|||||||
const form = new window.FormData()
|
const form = new window.FormData()
|
||||||
|
|
||||||
form.append('client_name', `PleromaFE_${Math.random()}`)
|
form.append('client_name', `PleromaFE_${Math.random()}`)
|
||||||
form.append('redirect_uris', `${window.location.origin}/oauth-callback`)
|
form.append('redirect_uris', `${window.location.origin}/~/oauth-callback`)
|
||||||
form.append('scopes', 'read write follow')
|
form.append('scopes', 'read write follow')
|
||||||
|
|
||||||
return window.fetch(url, {
|
return window.fetch(url, {
|
||||||
@ -64,7 +64,7 @@ const getToken = ({app, instance, code}) => {
|
|||||||
form.append('client_secret', app.client_secret)
|
form.append('client_secret', app.client_secret)
|
||||||
form.append('grant_type', 'authorization_code')
|
form.append('grant_type', 'authorization_code')
|
||||||
form.append('code', code)
|
form.append('code', code)
|
||||||
form.append('redirect_uri', `${window.location.origin}/oauth-callback`)
|
form.append('redirect_uri', `${window.location.origin}/~/oauth-callback`)
|
||||||
|
|
||||||
return window.fetch(url, {
|
return window.fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
Loading…
Reference in New Issue
Block a user