Skip to content

Commit b077502

Browse files
committed
Improve documentation and signature of registerClient
1 parent ce420f8 commit b077502

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/auth/clients.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export interface OAuthRegisteredClientsStore {
1010
getClient(clientId: string): OAuthClientInformationFull | undefined | Promise<OAuthClientInformationFull | undefined>;
1111

1212
/**
13-
* Registers a new client with the server. The client ID and secret will be automatically generated by the library. A modified version of the client information can be returned to reflect specific values enforced by the server.
13+
* Registers a new client with the server. The client ID and secret will be automatically generated by the library if clientRegistrationOptions.clientIdGeneration is not explicitly set to false. A modified version of the client information can be returned to reflect specific values enforced by the server.
1414
*
1515
* NOTE: Implementations should NOT delete expired client secrets in-place. Auth middleware provided by this library will automatically check the `client_secret_expires_at` field and reject requests with expired secrets. Any custom logic for authenticating clients should check the `client_secret_expires_at` field as well.
1616
*
1717
* If unimplemented, dynamic client registration is unsupported.
1818
*/
1919
registerClient?(
20-
client: Omit<OAuthClientInformationFull, 'client_id' | 'client_id_issued_at'>
20+
client: Omit<OAuthClientInformationFull, 'client_id' | 'client_id_issued_at'> & { client_id?: string; client_id_issued_at?: number }
2121
): OAuthClientInformationFull | Promise<OAuthClientInformationFull>;
2222
}

0 commit comments

Comments
 (0)