initial commit and test statements to test everything

This commit is contained in:
2026-01-16 12:07:04 +01:00
parent 81dfebd77f
commit 0672e4b2c5
6 changed files with 359 additions and 62 deletions

12
app/auth/getAuth.ts Normal file
View File

@@ -0,0 +1,12 @@
import { exchangeAccessCodeForAuthTokens, exchangeNpssoForAccessCode } from "psn-api";
import { NPSSOString } from "./AuthString";
/**
* This is a file which uses an string, that is supposed to be treated like a password. Therefore I import said string from another file which is in '.gitignore.
* It also exports the authorization token and refresh token to actually work with the psn Api
*/
const accessCode = await exchangeNpssoForAccessCode(NPSSOString);
export const authorization = await exchangeAccessCodeForAuthTokens(accessCode);