fix(login): remove default login redirect
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 50s
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 50s
This commit is contained in:
parent
1474fafde7
commit
6f4b41d84b
@ -56,8 +56,7 @@ export const useAuth = () => {
|
|||||||
* method will be chosen (extension or keys)
|
* method will be chosen (extension or keys)
|
||||||
*
|
*
|
||||||
* @param pubkey of the user trying to login
|
* @param pubkey of the user trying to login
|
||||||
* @returns url to redirect if authentication successfull
|
* @returns url to redirect if user has no relays set
|
||||||
* or error if otherwise
|
|
||||||
*/
|
*/
|
||||||
const authAndGetMetadataAndRelaysMap = useCallback(
|
const authAndGetMetadataAndRelaysMap = useCallback(
|
||||||
async (pubkey: string) => {
|
async (pubkey: string) => {
|
||||||
@ -108,7 +107,7 @@ export const useAuth = () => {
|
|||||||
dispatch(setRelayMapAction(relayMap))
|
dispatch(setRelayMapAction(relayMap))
|
||||||
}
|
}
|
||||||
|
|
||||||
return appPrivateRoutes.homePage
|
return
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
dispatch,
|
dispatch,
|
||||||
|
@ -46,7 +46,7 @@ export const MainLayout = () => {
|
|||||||
const hasSubscribed = useRef(false)
|
const hasSubscribed = useRef(false)
|
||||||
|
|
||||||
const navigateAfterLogin = useCallback(
|
const navigateAfterLogin = useCallback(
|
||||||
(path: string) => {
|
(path: string | undefined) => {
|
||||||
const isCallback = window.location.hash.startsWith('#/?callbackPath=')
|
const isCallback = window.location.hash.startsWith('#/?callbackPath=')
|
||||||
if (isCallback) {
|
if (isCallback) {
|
||||||
const path = atob(window.location.hash.replace('#/?callbackPath=', ''))
|
const path = atob(window.location.hash.replace('#/?callbackPath=', ''))
|
||||||
@ -57,7 +57,7 @@ export const MainLayout = () => {
|
|||||||
navigate(path)
|
navigate(path)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
navigate(path)
|
if (path) navigate(path)
|
||||||
},
|
},
|
||||||
[navigate, setSearchParams]
|
[navigate, setSearchParams]
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user