Skip to content

Document how to get introspection to work on any route #1808

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

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

Jayfrown
Copy link
Contributor

The previously documented solution would only trigger introspection on the / route. Users directly navigating to a resource without being authenticated (eg. navigating to /#/books and then being redirected to the authentication page) would not hit the <Route path="/">, and thus wouldn't trigger introspection after authenticating.

If redirectToLogin is true, the <Resource>es shouldn't be defined in the application because otherwise they will register the specific routes, e.g. /#/books, meaning the <Route path="/:any"> wouldn't be selected, and introspection also would not be triggered.

The previously documented solution would only trigger introspection on
the `/` route. Users directly navigating to a resource without being
authenticated (eg. navigating to `/#/books` and then being redirected to
the authentication page) would not hit the `<Route path="/">`, and thus
wouldn't trigger introspection after authenticating.

If `redirectToLogin` is `true`, the `<Resource>`es shouldn't be defined
in the application because otherwise they will register the specific
routes, e.g. `/#/books`, meaning the `<Route path="/:any">` wouldn't be
selected, and introspection also would not be triggered.
@soyuka soyuka merged commit a6bffb0 into api-platform:3.1 Oct 16, 2023
@soyuka
Copy link
Member

soyuka commented Oct 16, 2023

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants