include client in id token issue
This commit is contained in:
parent
aef42b6638
commit
8cd0498db4
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@icynet/oauth2-provider",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "OAuth2.0 Provider for Icy Network",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
@ -208,6 +208,7 @@ export const authorization = wrap(async (req, res) => {
|
||||
|
||||
data = await oauth2.model.jwt.issueIdToken(
|
||||
user,
|
||||
client,
|
||||
scope,
|
||||
redirectUri,
|
||||
req.query.nonce as string | undefined
|
||||
|
@ -116,7 +116,13 @@ export async function authorizationCode(
|
||||
);
|
||||
|
||||
try {
|
||||
respObj.id_token = await oauth2.model.jwt.issueIdToken(user, cleanScope, undefined, code.nonce);
|
||||
respObj.id_token = await oauth2.model.jwt.issueIdToken(
|
||||
user,
|
||||
client,
|
||||
cleanScope,
|
||||
undefined,
|
||||
code.nonce
|
||||
);
|
||||
} catch (err) {
|
||||
oauth2.logger.error(err);
|
||||
throw new ServerError('Failed to issue an ID token');
|
||||
|
@ -327,6 +327,7 @@ export interface JWTAdapter {
|
||||
*/
|
||||
issueIdToken: (
|
||||
user: OAuth2User,
|
||||
client: OAuth2Client,
|
||||
scope: string[],
|
||||
redirectUri?: string,
|
||||
nonce?: string
|
||||
|
Reference in New Issue
Block a user