Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passkeys funktionierten in Chrome nicht #5625

Merged
merged 2 commits into from Mar 7, 2023
Merged

Passkeys funktionierten in Chrome nicht #5625

merged 2 commits into from Mar 7, 2023

Conversation

gharlan
Copy link
Member

@gharlan gharlan commented Mar 6, 2023

rex:ready ist im Chrome schon gelaufen, wenn der Code in der webauthn.js erreicht wird.
Daher nun ein Workaround.

@gharlan gharlan added this to the REDAXO 5.15.1 milestone Mar 6, 2023
$(document).on('rex:ready', function (event, container) {
init(container.get(0));
});
}, 1000);
Copy link
Member

@staabm staabm Mar 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wenn rex:ready nach init aber bevor 1000ms vergangen sind getriggert wird, funktioniert der fallback über den timeout nicht, oder?

wozu überhaupt der timeout?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also wenn innerhalb von 1sek schon ein Pjax-Call kommt per rex:ready, dann geht der unter.
Der initiale Call wird aber immer erwischt, da ich ja init selbst aufrufe.
Das Tiemout ist dafür, damit im safari nicht doppelt initialisiert wird.

Ich mag es gar nicht, über setTimeout so zu tricksen. Aber hatte nicht so recht eine andere Idee.

Also inital muss init auf jeden Fall aufgerufen werden, egal ob rex:ready schon war. Soll aber nicht zweimal aufgerufen werden.
Und für alle folgenden Pjax-Calls soll aber auch initialisiert werden, deswegen rex:ready.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hatte jetzt doch noch eine bessere Idee.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sieht besser aus, danke

@gharlan gharlan merged commit 5066bbd into main Mar 7, 2023
@gharlan gharlan deleted the passkey branch March 7, 2023 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants