Fix oauth url

This commit is contained in:
Maxim Filippov 2018-12-17 21:58:14 +03:00
parent f671adae37
commit 63ad08050e

View File

@ -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',