mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
fix(ui): fix callback link params for apple (#985)
fix callback link params for apple
This commit is contained in:
parent
d0d507ab79
commit
362c3a6e6e
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@ const useSocialCallbackHandler = () => {
|
|||
|
||||
const socialCallbackHandler = useCallback(
|
||||
(connectorId: string) => {
|
||||
// Apple use fragment mode to store auth parameter. Need to support it.
|
||||
const data = window.location.search || '?' + window.location.hash.slice(1);
|
||||
const { state, error, error_description } = parseQueryParameters(data);
|
||||
|
||||
|
@ -35,7 +36,7 @@ const useSocialCallbackHandler = () => {
|
|||
const callbackLink = getCallbackLinkFromStorage(connectorId);
|
||||
|
||||
if (callbackLink) {
|
||||
window.location.replace(new URL(`${callbackLink}${window.location.search}`));
|
||||
window.location.replace(new URL(`${callbackLink}${data}`));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue