strapi-custom-auth 1.2.29 → 1.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/index.js +4 -15
- package/dist/server/index.mjs +4 -15
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -3391,7 +3391,7 @@ async function microsoftLogout(ctx) {
|
|
|
3391
3391
|
}
|
|
3392
3392
|
async function microsoftTokenRenewal(ctx) {
|
|
3393
3393
|
const userService = strapi.service("admin::user");
|
|
3394
|
-
|
|
3394
|
+
strapi.service("admin::token");
|
|
3395
3395
|
const config2 = configValidation();
|
|
3396
3396
|
const { body } = ctx.request;
|
|
3397
3397
|
const params = new URLSearchParams();
|
|
@@ -3415,21 +3415,10 @@ async function microsoftTokenRenewal(ctx) {
|
|
|
3415
3415
|
}
|
|
3416
3416
|
});
|
|
3417
3417
|
const { mail } = userResponse?.data;
|
|
3418
|
-
console.log("----mail----", mail);
|
|
3419
3418
|
const dbUser = await userService.findOneByEmail(mail);
|
|
3420
|
-
const jwtToken =
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
console.log("----dbUser----", dbUser);
|
|
3424
|
-
console.log("----dbUser----", JSON.stringify(dbUser));
|
|
3425
|
-
const jwtToken2 = strapi.plugins["users-permissions"].services.jwt.issue({
|
|
3426
|
-
id: dbUser.id
|
|
3427
|
-
});
|
|
3428
|
-
console.log("----jwtToken2----", jwtToken2);
|
|
3429
|
-
console.log("----jwtToken2----", JSON.stringify(jwtToken2));
|
|
3430
|
-
} catch (e2) {
|
|
3431
|
-
console.log("----jwtToken2----, e", JSON.stringify(e2));
|
|
3432
|
-
}
|
|
3419
|
+
const jwtToken = strapi.plugins["users-permissions"].services.jwt.issue({
|
|
3420
|
+
id: dbUser.id
|
|
3421
|
+
});
|
|
3433
3422
|
return ctx.send({ accessToken: jwtToken, refreshToken: tokenResponse.data.refresh_token });
|
|
3434
3423
|
} catch (e2) {
|
|
3435
3424
|
console.error(e2.message);
|
package/dist/server/index.mjs
CHANGED
|
@@ -3376,7 +3376,7 @@ async function microsoftLogout(ctx) {
|
|
|
3376
3376
|
}
|
|
3377
3377
|
async function microsoftTokenRenewal(ctx) {
|
|
3378
3378
|
const userService = strapi.service("admin::user");
|
|
3379
|
-
|
|
3379
|
+
strapi.service("admin::token");
|
|
3380
3380
|
const config2 = configValidation();
|
|
3381
3381
|
const { body } = ctx.request;
|
|
3382
3382
|
const params = new URLSearchParams();
|
|
@@ -3400,21 +3400,10 @@ async function microsoftTokenRenewal(ctx) {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
});
|
|
3402
3402
|
const { mail } = userResponse?.data;
|
|
3403
|
-
console.log("----mail----", mail);
|
|
3404
3403
|
const dbUser = await userService.findOneByEmail(mail);
|
|
3405
|
-
const jwtToken =
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
console.log("----dbUser----", dbUser);
|
|
3409
|
-
console.log("----dbUser----", JSON.stringify(dbUser));
|
|
3410
|
-
const jwtToken2 = strapi.plugins["users-permissions"].services.jwt.issue({
|
|
3411
|
-
id: dbUser.id
|
|
3412
|
-
});
|
|
3413
|
-
console.log("----jwtToken2----", jwtToken2);
|
|
3414
|
-
console.log("----jwtToken2----", JSON.stringify(jwtToken2));
|
|
3415
|
-
} catch (e2) {
|
|
3416
|
-
console.log("----jwtToken2----, e", JSON.stringify(e2));
|
|
3417
|
-
}
|
|
3404
|
+
const jwtToken = strapi.plugins["users-permissions"].services.jwt.issue({
|
|
3405
|
+
id: dbUser.id
|
|
3406
|
+
});
|
|
3418
3407
|
return ctx.send({ accessToken: jwtToken, refreshToken: tokenResponse.data.refresh_token });
|
|
3419
3408
|
} catch (e2) {
|
|
3420
3409
|
console.error(e2.message);
|
package/package.json
CHANGED