julian on Nostr: the API is best used as a server to server API, and so using it as a frontend API is ...
the API is best used as a server to server API, and so using it as a frontend API is doable but yes, could be problematic in the way you suggest.
What I'd recommend is having a light server back-end to proxy those requests to NodeBB. The tokens should never be exposed to user facing components.
Published at
2024-07-08 16:40:25Event JSON
{
"id": "895db77c7edd7a5b7a066f3d0184ced96450ab4c3b421b1a24f9c7ee20da5ead",
"pubkey": "e029f14f762f4c51bfdbbc1ff1b2a0ef5244732192a014cbeea57b8758c36c23",
"created_at": 1720456825,
"kind": 1,
"tags": [
[
"proxy",
"https://community.nodebb.org/post/100259",
"web"
],
[
"p",
"a40a885404e28f9f86b105a20bf9f35b173f40b05cf8060084562e765512e2c2"
],
[
"e",
"6628db2812cf5a1bf32fefb771b3febdd713bc2f2485f97b54c94d1818aecfaa",
"",
"root"
],
[
"proxy",
"https://community.nodebb.org/post/100259",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://community.nodebb.org/post/100259",
"pink.momostr"
],
[
"expiration",
"1723048840"
]
],
"content": "the API is best used as a server to server API, and so using it as a frontend API is doable but yes, could be problematic in the way you suggest.\n\n\nWhat I'd recommend is having a light server back-end to proxy those requests to NodeBB. The tokens should never be exposed to user facing components.\n\n\n",
"sig": "000f1fc545720eb5afbd3e89c03a86dc8d4b2a1d27108d925d30eef546667256377328a1c3eb60d202764f5ed84eeb4242c162ae8c0012ff085433fe1355d55c"
}