mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(console): cloud ac profile should use correct callback URL when linking social (#3303)
This commit is contained in:
parent
3d57b94e30
commit
8caa752106
2 changed files with 5 additions and 2 deletions
|
@ -111,7 +111,7 @@ const LinkAccountSection = ({ user, onUpdate }: Props) => {
|
|||
const authUri = await getSocialAuthorizationUri(id);
|
||||
const callback = new URL(
|
||||
`${getBasename()}/handle-social`,
|
||||
adminTenantEndpointUrl
|
||||
window.location.origin
|
||||
).toString();
|
||||
|
||||
const queries = new URLSearchParams({
|
||||
|
|
|
@ -16,7 +16,10 @@ const HandleSocialCallback = () => {
|
|||
|
||||
if (connectorId) {
|
||||
const queries = new URLSearchParams(search);
|
||||
queries.set('redirectUri', `${adminTenantEndpoint}/callback/${connectorId}`);
|
||||
queries.set(
|
||||
'redirectUri',
|
||||
new URL(`/callback/${connectorId}`, new URL(adminTenantEndpoint)).toString()
|
||||
);
|
||||
const connectorData = Object.fromEntries(queries);
|
||||
|
||||
await api.post('me/social/link-identity', { json: { connectorId, connectorData } });
|
||||
|
|
Loading…
Reference in a new issue