mirror of
https://github.com/PeWu/topola-viewer.git
synced 2025-12-24 03:00:05 +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') {
|
||||
sourceSpec = {
|
||||
source: DataSourceEnum.WIKITREE,
|
||||
authcode: getParam('?authcode'),
|
||||
authcode: getParam('authcode'),
|
||||
};
|
||||
} else if (hash) {
|
||||
sourceSpec = {
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user