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}` } })) }