mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
fix(ui): added search + hash string interpolation (#3431)
Signed-off-by: Tasos Derisiotis <50984242+Eengineer1@users.noreply.github.com>
This commit is contained in:
parent
451f77161e
commit
382c8a82a9
1 changed files with 10 additions and 2 deletions
|
@ -8,8 +8,16 @@ const useSocialCallbackHandler = () => {
|
|||
|
||||
const socialCallbackHandler = useCallback(
|
||||
(connectorId: string) => {
|
||||
// Apple use fragment mode to store auth parameter. Need to support it.
|
||||
const search = window.location.search || '?' + window.location.hash.slice(1);
|
||||
// Get search string to evaluate
|
||||
const searchString = window.location.search;
|
||||
|
||||
// Get hash string to evaluate
|
||||
const hashString = window.location.hash;
|
||||
|
||||
// Define evaluated search string
|
||||
const search = `${searchString || '?'}${
|
||||
searchString && hashString ? '&' : ''
|
||||
}${hashString.slice(1)}`;
|
||||
|
||||
// Get native callback link from storage
|
||||
const callbackLink = getCallbackLinkFromStorage(connectorId);
|
||||
|
|
Loading…
Reference in a new issue