Flesh out payment stuff
This commit is contained in:
parent
b0dcdd6438
commit
acfed861ab
27 changed files with 938 additions and 173 deletions
|
|
@ -36,14 +36,14 @@ async function getTokenWithServiceAccount(): Promise<string> {
|
|||
|
||||
const tokenUrl = `${AUTHENTIK_URL}/application/o/token/`;
|
||||
const params = new URLSearchParams({
|
||||
grant_type: 'client_credentials',
|
||||
grant_type: 'password',
|
||||
client_id: CLIENT_ID,
|
||||
username: USERNAME,
|
||||
password: PASSWORD,
|
||||
scope: 'openid profile email',
|
||||
});
|
||||
|
||||
console.log(` Trying client_credentials with username/password...`);
|
||||
console.log(` Trying password grant with username/password...`);
|
||||
const response = await fetch(tokenUrl, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue