Skip to content

Commit

Permalink
fix: make getUserFromClient async
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Oct 10, 2024
1 parent 1dc0cad commit 4af2c17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/oauth/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,12 @@ export default class OAuthModel implements AuthorizationCodeModel, RefreshTokenM
return await this.sql(OAuthModel.usersTable).where({ id }).select<InternalUser>([ 'id', 'github_username' ]).first() || null;
}

getUserFromClient (client: ClientWithCredentials): Promise<ClientCredentialsUser | null> {
async getUserFromClient (client: ClientWithCredentials): Promise<ClientCredentialsUser | null> {
if (client.secrets.length === 0) {
throw new InvalidClientError('Invalid client: client should have secret');
}

return Promise.resolve({ id: null });
return { id: null };
}

async revokeToken (token: RefreshToken): Promise<boolean> {
Expand Down

0 comments on commit 4af2c17

Please sign in to comment.