Skip to content

Commit

Permalink
Refactor: accessToken 유니크하게 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
Jihoon Ko committed May 22, 2024
1 parent 3c2b667 commit eeba151
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/auth/application/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class AuthService {
this.accessTokenOption,
);

await this.makeAccessToken(customer, accessToken);
await this.saveAccessToken(customer, accessToken);

const refreshToken = this.jwtService.sign(
{ tokenType: 'refresh', subject: customer.customerId },
Expand Down Expand Up @@ -80,7 +80,7 @@ export class AuthService {
this.refreshTokenOption,
);

await this.makeAccessToken(customer, accessToken);
await this.saveAccessToken(customer, accessToken);

await this.customerService.update({
...customer,
Expand All @@ -94,7 +94,7 @@ export class AuthService {
};
}

private async makeAccessToken(customer: Customer, accessToken: string) {
private async saveAccessToken(customer: Customer, accessToken: string) {
const key = `customer:${customer.customerId}:accessToken`;

if (this.accessTokenStrategy.toLowerCase() === 'unique') {
Expand Down

0 comments on commit eeba151

Please sign in to comment.