0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): user should switch account and accept invitation properly in console (#5657)

* fix(console): bump js sdks to fix the cannot switch user account issue

* fix(console): accept invitation automatically after switching account
This commit is contained in:
Charles Zhao 2024-04-09 17:30:17 +08:00 committed by GitHub
parent 919fd8b00d
commit 2c97cd6898
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 20 deletions

View file

@ -34,7 +34,7 @@
"@logto/language-kit": "workspace:^1.1.0",
"@logto/phrases": "workspace:^1.9.0",
"@logto/phrases-experience": "workspace:^1.6.0",
"@logto/react": "^3.0.3",
"@logto/react": "^3.0.5",
"@logto/schemas": "workspace:^1.13.1",
"@logto/shared": "workspace:^3.1.0",
"@mdx-js/react": "^1.6.22",

View file

@ -12,6 +12,7 @@ import AppLoading from '@/components/AppLoading';
import { TenantsContext } from '@/contexts/TenantsProvider';
import { type RequestError } from '@/hooks/use-api';
import useRedirectUri from '@/hooks/use-redirect-uri';
import { saveRedirect } from '@/utils/storage';
import SwitchAccount from './SwitchAccount';
@ -54,6 +55,7 @@ function AcceptInvitation() {
return (
<SwitchAccount
onClickSwitch={() => {
saveRedirect();
void signIn({
redirectUri: redirectUri.href,
loginHint: `urn:logto:invitation:${invitationId}`,

View file

@ -22,7 +22,7 @@
"@logto/core-kit": "workspace:^2.3.0",
"@logto/language-kit": "workspace:^1.1.0",
"@logto/phrases": "workspace:^1.9.0",
"@logto/react": "^3.0.3",
"@logto/react": "^3.0.5",
"@logto/schemas": "workspace:^1.13.0",
"@parcel/core": "2.9.3",
"@parcel/transformer-sass": "2.9.3",

View file

@ -27,7 +27,7 @@
"@logto/connector-kit": "workspace:^2.1.0",
"@logto/core-kit": "workspace:^",
"@logto/js": "^4.1.1",
"@logto/node": "^2.4.2",
"@logto/node": "^2.4.4",
"@logto/schemas": "workspace:^1.13.0",
"@logto/shared": "workspace:^3.1.0",
"@silverhand/eslint-config": "5.0.0",

View file

@ -2733,8 +2733,8 @@ importers:
specifier: workspace:^1.6.0
version: link:../phrases-experience
'@logto/react':
specifier: ^3.0.3
version: 3.0.3(react@18.2.0)
specifier: ^3.0.5
version: 3.0.5(react@18.2.0)
'@logto/schemas':
specifier: workspace:^1.13.1
version: link:../schemas
@ -3316,8 +3316,8 @@ importers:
specifier: workspace:^1.9.0
version: link:../phrases
'@logto/react':
specifier: ^3.0.3
version: 3.0.3(react@18.2.0)
specifier: ^3.0.5
version: 3.0.5(react@18.2.0)
'@logto/schemas':
specifier: workspace:^1.13.0
version: link:../schemas
@ -3635,8 +3635,8 @@ importers:
specifier: ^4.1.1
version: 4.1.1
'@logto/node':
specifier: ^2.4.2
version: 2.4.2
specifier: ^2.4.4
version: 2.4.4
'@logto/schemas':
specifier: workspace:^1.13.0
version: link:../schemas
@ -7627,16 +7627,16 @@ packages:
tiny-cookie: 2.4.1
dev: false
/@logto/browser@2.2.5:
resolution: {integrity: sha512-oeMeTEJwpJamM8oEjGXo2cSTeimJyVWygpq57URp39VY+5v23vFzJwh1tUE5lGgTrVIcLdn4dUAKtHVO69bXsA==}
/@logto/browser@2.2.7:
resolution: {integrity: sha512-+tB4QWB4/JSO5pXItX491mRR4Id5dsYlEJchI0gPC8JNX7cl4968/oDXhqQ42XWqFnqX3W5Wx7RgKeV6JtTMhg==}
dependencies:
'@logto/client': 2.6.1
'@logto/client': 2.6.3
'@silverhand/essentials': 2.9.0
js-base64: 3.7.5
dev: true
/@logto/client@2.6.1:
resolution: {integrity: sha512-gsUAfR8fTGdSAOItqS1rNb89NzOggL014UGS+1LIx8YxeerbDCbrVPcEHLZRDgq1MBVzhAz41P0ePQ0JWxj8Rg==}
/@logto/client@2.6.3:
resolution: {integrity: sha512-uZphb17TZD2rXTiYfhPaIpiavMbUec+WwznIWIm2wJ9x4th8UO05egw9eTPiSaoEOZSuoPs6oWBROP1SQ00iBg==}
dependencies:
'@logto/js': 4.1.1
'@silverhand/essentials': 2.9.0
@ -7661,20 +7661,20 @@ packages:
camelcase-keys: 7.0.2
dev: true
/@logto/node@2.4.2:
resolution: {integrity: sha512-Pkcrmh/uhD0rN/euiARuSAeYoYIWZnxCpNhRV0I9aLnEMmKzBDLHLnKnpORa1A6sCKBEKW2S6J6T2R2euni4CQ==}
/@logto/node@2.4.4:
resolution: {integrity: sha512-3qkhXQKGZX5cVBfWT6n2l0kN9ln3fPShXngHaY5LTBBRd0b2e20h1XIrXCdoGoMmdSp1zntEo2PMv0+fBodzcw==}
dependencies:
'@logto/client': 2.6.1
'@logto/client': 2.6.3
'@silverhand/essentials': 2.9.0
js-base64: 3.7.5
dev: true
/@logto/react@3.0.3(react@18.2.0):
resolution: {integrity: sha512-DgldhAs3T8lWXF8AtPcaSc4MQqpFmUl5y9sOv42g76RN1ijDGC2L/AY+X0RV22IxdcZ3qe2SxNAG6sXlulf+XA==}
/@logto/react@3.0.5(react@18.2.0):
resolution: {integrity: sha512-oCwKBGRf79QRo/MixPi8C8myZwHOx7eMon3/05nho0iiwBPllI2zSUJ7jUOnlFFnKTOLYV03l8pEMFnF+ODKyw==}
peerDependencies:
react: '>=16.8.0 || ^18.0.0'
dependencies:
'@logto/browser': 2.2.5
'@logto/browser': 2.2.7
'@silverhand/essentials': 2.9.0
react: 18.2.0
dev: true