Update WikiTree login flow

WikiTree login now appends `&authcode=x` instead of `?authcode=x` to the return URL
This commit is contained in:
Przemek Wiech
2022-04-06 23:30:43 +02:00
parent 6107aef874
commit 2e2c81a770
2 changed files with 3 additions and 4 deletions

View File

@@ -161,9 +161,8 @@ export function WikiTreeLoginMenu(props: Props) {
function login() {
const wikiTreeTopolaUrl =
'https://apps.wikitree.com/apps/wiech13/topola-viewer';
// Append '&' because the login page appends '?authcode=...' to this URL.
// TODO: remove ?authcode if it is in the current URL.
const returnUrl = `${wikiTreeTopolaUrl}${window.location.hash}&`;
// TODO: remove authcode if it is in the current URL.
const returnUrl = `${wikiTreeTopolaUrl}${window.location.hash}`;
returnUrlRef.current!.value = returnUrl;
formRef.current!.submit();
}