Skip to content

Commit

Permalink
Merge pull request #20 from tookey-io/develop
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
alerdenisov authored Nov 8, 2023
2 parents ee317eb + e4e7b6c commit f4eb6f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/api/src/secrets/secrets.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class SecretsService {
const body: Record<string, string> = {
grant_type: 'refresh_token',
refresh_token: appConnection.refreshToken,
redirect_uri: this.config.getOrThrow('publicUrl') + '/api/secrets/redirect',
};

const headers: Record<string, string> = {
Expand All @@ -38,7 +39,7 @@ export class SecretsService {
switch (authorizationMethod) {
case AuthorizationMethod.BODY:
body.client_id = appConnection.clientId;
body.client_secret = appConnection.pieceName;
body.client_secret = clientSecret;
break;
case AuthorizationMethod.HEADER:
headers.authorization = `Basic ${Buffer.from(`${appConnection.clientId}:${clientSecret}`).toString('base64')}`;
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class UserService {

try {
const user = await this.createUser({}, entityManager);
const userGoogle = await this.googleUsers.createOrUpdateOne({ ...dto, userId: user.id }, entityManager);
const userGoogle = await this.googleUsers.createOrUpdateOne({ ...dto, user }, entityManager);

await queryRunner.commitTransaction();

Expand Down

0 comments on commit f4eb6f8

Please sign in to comment.