From 6d5585591def46500a248e64fb68c1eaaf7bd081 Mon Sep 17 00:00:00 2001 From: Christopher Gurnee Date: Thu, 4 Nov 2021 14:14:57 +0000 Subject: [PATCH] Partially revert commit 16d6652 --- src/api/reddit/auth.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/api/reddit/auth.js b/src/api/reddit/auth.js index 7087716..954da8f 100644 --- a/src/api/reddit/auth.js +++ b/src/api/reddit/auth.js @@ -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}` } })) }