elements
elements copied to clipboard
Examples use incorrect search param "aal2" instead of "aal"
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [X] I have joined the Ory Community Slack.
- [X] I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe the bug
The react-spa and preact-spa examples appear to read the wrong query string parameter when checking if aal2 is requested:
const aal2 = searchParams.get("aal2")
As far as I can tell the parameter name is "aal", not "aal2", and it will be set to the value "aa2". Either that or the documentation is wrong? The nextjs-spa seems to use the correct parameter:
const aal = String(router.query.aal || "")
Reproducing the bug
Run the react-spa or preact-spa example in a way that aal2 is requried.
Relevant log output
No response
Relevant configuration
No response
Version
n/a
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
The examples also seem to be missing the @ory/client dependency in their package.json (including the nextjs-spa example)