mirror of
https://github.com/logto-io/logto.git
synced 2025-04-07 23:01:25 -05:00
fix(core): social user info in session (#794)
This commit is contained in:
parent
13cd2c100e
commit
74f2940398
2 changed files with 9 additions and 2 deletions
packages/core/src/routes
|
@ -422,7 +422,9 @@ describe('sessionRoutes', () => {
|
|||
expect(interactionResult).toHaveBeenCalledWith(
|
||||
expect.anything(),
|
||||
expect.anything(),
|
||||
expect.objectContaining({ connectorId: '_connectorId_', userInfo: { id: 'id' } }),
|
||||
expect.objectContaining({
|
||||
socialUserInfo: { connectorId: '_connectorId_', userInfo: { id: 'id' } },
|
||||
}),
|
||||
expect.anything()
|
||||
);
|
||||
expect(response.statusCode).toEqual(422);
|
||||
|
|
|
@ -228,7 +228,12 @@ export default function sessionRoutes<T extends AnonymousRouter>(router: T, prov
|
|||
ctx.log(type, { userInfo });
|
||||
|
||||
if (!(await hasUserWithIdentity(connectorId, userInfo.id))) {
|
||||
await assignInteractionResults(ctx, provider, { connectorId, userInfo }, true);
|
||||
await assignInteractionResults(
|
||||
ctx,
|
||||
provider,
|
||||
{ socialUserInfo: { connectorId, userInfo } },
|
||||
true
|
||||
);
|
||||
const relatedInfo = await findSocialRelatedUser(userInfo);
|
||||
throw new RequestError(
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue