Grabbed dndbeyond's source code

```
~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js
```
This commit is contained in:
2025-05-28 11:50:03 -07:00
commit 8df9031d27
3592 changed files with 319051 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import { UserUtils } from "@dndbeyond/authentication-lib-js";
import { getDecodedStt } from "./tokenUtils";
export const getUserToken = async () => {
const stt = await getDecodedStt();
return stt;
};
export const getUser = async () => {
const token = await getUserToken();
return {
...UserUtils.jwtToUser(token),
displayName: token.displayName,
};
};
export const getUserDisplayName = async () => {
const user = await getUser();
return user.displayName;
};
export const getUserId = async () => {
const user = await getUser();
return user.id;
};
export const getSubscriptionTier = async () => {
const user = await getUser();
return user.subscriptionTier;
};
export const getRoles = async () => {
const user = await getUser();
return user.roles;
};