mirror of
https://github.com/gurnec/removeddit.git
synced 2026-03-11 08:54:27 +00:00
Partially revert commit 16d6652
This commit is contained in:
parent
842061ef2b
commit
6d5585591d
1 changed files with 2 additions and 5 deletions
|
|
@ -5,7 +5,6 @@ import { fetchJson } from '../../utils'
|
|||
|
||||
// Current using dummy ID from throwaway
|
||||
const clientID = 'ZmYXJ5RaSDhF-77YaFulWw'
|
||||
const userAgent = 'com.unddit.www (by /u/unddit-com)'
|
||||
|
||||
// Token for reddit API
|
||||
let token
|
||||
|
|
@ -20,8 +19,7 @@ const getToken = () => {
|
|||
const tokenInit = {
|
||||
headers: {
|
||||
Authorization: `Basic ${window.btoa(`${clientID}:`)}`,
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
|
||||
'User-Agent': userAgent
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
|
||||
},
|
||||
method: 'POST',
|
||||
body: `grant_type=${encodeURIComponent('https://oauth.reddit.com/grants/installed_client')}&device_id=DO_NOT_TRACK_THIS_DEVICE`
|
||||
|
|
@ -43,8 +41,7 @@ export const getAuth = () => {
|
|||
return getToken()
|
||||
.then(token => ({
|
||||
headers: {
|
||||
Authorization: `bearer ${token}`,
|
||||
'User-Agent': userAgent
|
||||
Authorization: `bearer ${token}`
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue