initial commit and test statements to test everything
This commit is contained in:
12
app/auth/getAuth.ts
Normal file
12
app/auth/getAuth.ts
Normal 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);
|
||||
|
||||
Reference in New Issue
Block a user