include nonce in code creation

This commit is contained in:
Evert Prants 2022-09-16 17:45:23 +03:00
parent 8cd0498db4
commit 2a7fd4690b
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@icynet/oauth2-provider", "name": "@icynet/oauth2-provider",
"version": "1.0.3", "version": "1.0.4",
"description": "OAuth2.0 Provider for Icy Network", "description": "OAuth2.0 Provider for Icy Network",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -179,7 +179,8 @@ export const authorization = wrap(async (req, res) => {
oauth2.model.user.getId(user), oauth2.model.user.getId(user),
oauth2.model.client.getId(client), oauth2.model.client.getId(client),
scope, scope,
oauth2.model.code.ttl oauth2.model.code.ttl,
req.query.nonce as string,
); );
resObj = { code: data, ...resObj }; resObj = { code: data, ...resObj };

View File

@ -179,7 +179,8 @@ export interface OAuth2CodeAdapter {
userId: string | number, userId: string | number,
clientId: string | number, clientId: string | number,
scope: string | string[], scope: string | string[],
ttl: number ttl: number,
nonce?: string
) => Promise<string>; ) => Promise<string>;
/** /**