aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-08-04 15:17:48 -0400
committerMark Felder <feld@feld.me>2024-09-01 12:09:07 -0400
commit06ebbaf7ba2261d0a1c3c564dcdb5eb5fe32a782 (patch)
treeeb0084e0b4aaa4433ef0ff8430ce5b201391107b
parent87fe063cb656433efb796c3682e4b211e8ff7ba6 (diff)
Simplify the OAuth client_name
Every time PleromaFE is used to login it will need to do the OAuth dance and request an app key. If the client name is not stable it will pollute the server's database with entries. This also happens on every unauthenticated page load at the moment until #1339 is resolved
-rw-r--r--changelog.d/oauth-app-name.change1
-rw-r--r--src/services/new_api/oauth.js3
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.d/oauth-app-name.change b/changelog.d/oauth-app-name.change
new file mode 100644
index 00000000..15d6f87e
--- /dev/null
+++ b/changelog.d/oauth-app-name.change
@@ -0,0 +1 @@
+Simplify the OAuth client_name to 'PleromaFE'
diff --git a/src/services/new_api/oauth.js b/src/services/new_api/oauth.js
index 3c8e64bd..a4b7cbf0 100644
--- a/src/services/new_api/oauth.js
+++ b/src/services/new_api/oauth.js
@@ -10,7 +10,8 @@ export const getOrCreateApp = ({ clientId, clientSecret, instance, commit }) =>
const url = `${instance}/api/v1/apps`
const form = new window.FormData()
- form.append('client_name', `PleromaFE_${window.___pleromafe_commit_hash}_${(new Date()).toISOString()}`)
+ form.append('client_name', 'PleromaFE')
+ form.append('website', 'https://pleroma.social')
form.append('redirect_uris', REDIRECT_URI)
form.append('scopes', 'read write follow push admin')