mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-02-18 02:55:48 +00:00
Update WikiTree login flow
WikiTree login now appends `&authcode=x` instead of `?authcode=x` to the return URL
This commit is contained in:
parent
6107aef874
commit
2e2c81a770
@ -134,7 +134,7 @@ function getArguments(location: H.Location<any>): Arguments {
|
|||||||
if (getParam('source') === 'wikitree') {
|
if (getParam('source') === 'wikitree') {
|
||||||
sourceSpec = {
|
sourceSpec = {
|
||||||
source: DataSourceEnum.WIKITREE,
|
source: DataSourceEnum.WIKITREE,
|
||||||
authcode: getParam('?authcode'),
|
authcode: getParam('authcode'),
|
||||||
};
|
};
|
||||||
} else if (hash) {
|
} else if (hash) {
|
||||||
sourceSpec = {
|
sourceSpec = {
|
||||||
|
|||||||
@ -161,9 +161,8 @@ export function WikiTreeLoginMenu(props: Props) {
|
|||||||
function login() {
|
function login() {
|
||||||
const wikiTreeTopolaUrl =
|
const wikiTreeTopolaUrl =
|
||||||
'https://apps.wikitree.com/apps/wiech13/topola-viewer';
|
'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.
|
||||||
// TODO: remove ?authcode if it is in the current URL.
|
const returnUrl = `${wikiTreeTopolaUrl}${window.location.hash}`;
|
||||||
const returnUrl = `${wikiTreeTopolaUrl}${window.location.hash}&`;
|
|
||||||
returnUrlRef.current!.value = returnUrl;
|
returnUrlRef.current!.value = returnUrl;
|
||||||
formRef.current!.submit();
|
formRef.current!.submit();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user