From a6bffb0f0507c15a512fc50373ae9af2b69f3c94 Mon Sep 17 00:00:00 2001 From: Jeroen de Boer Date: Mon, 16 Oct 2023 18:25:06 +0200 Subject: [PATCH] Document how to get introspection to work on any route (#1808) 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 ``, and thus wouldn't trigger introspection after authenticating. If `redirectToLogin` is `true`, the ``es shouldn't be defined in the application because otherwise they will register the specific routes, e.g. `/#/books`, meaning the `` wouldn't be selected, and introspection also would not be triggered. --- admin/authentication-support.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/admin/authentication-support.md b/admin/authentication-support.md index 7ce33055a15..48b90bc2f2c 100644 --- a/admin/authentication-support.md +++ b/admin/authentication-support.md @@ -79,9 +79,17 @@ const Admin = () => { - - {redirectToLogin ? } /> : null} - + {redirectToLogin ? ( + + } /> + } /> + + ) : ( + <> + + + + )} );