From f9fcc342dfd2ba70d7fd07507269e11f1d0b5616 Mon Sep 17 00:00:00 2001 From: rishabhpoddar Date: Fri, 24 Nov 2023 20:38:42 +0530 Subject: [PATCH] fixes docs for optional session --- .../sessions/protecting-frontend-routes.mdx | 8 ++++++-- .../sessions/protecting-frontend-routes.mdx | 8 ++++++-- .../sessions/protecting-frontend-routes.mdx | 8 ++++++-- .../sessions/protecting-frontend-routes.mdx | 8 ++++++-- .../sessions/protecting-frontend-routes.mdx | 8 ++++++-- .../sessions/protecting-frontend-routes.mdx | 8 ++++++-- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/v2/emailpassword/common-customizations/sessions/protecting-frontend-routes.mdx b/v2/emailpassword/common-customizations/sessions/protecting-frontend-routes.mdx index 4b33c7f0f..8927f78de 100644 --- a/v2/emailpassword/common-customizations/sessions/protecting-frontend-routes.mdx +++ b/v2/emailpassword/common-customizations/sessions/protecting-frontend-routes.mdx @@ -65,7 +65,7 @@ class App extends React.Component { ## Optional session on a route -The `` component passes the session context to all components using which you can check if a session exists. +You can provide the `requireAuth={false}` prop when using `` as shown below: ```tsx import React from "react"; @@ -84,7 +84,11 @@ class App extends React.Component { + // highlight-start + + // highlight-end + + } /> diff --git a/v2/passwordless/common-customizations/sessions/protecting-frontend-routes.mdx b/v2/passwordless/common-customizations/sessions/protecting-frontend-routes.mdx index 4b33c7f0f..8927f78de 100644 --- a/v2/passwordless/common-customizations/sessions/protecting-frontend-routes.mdx +++ b/v2/passwordless/common-customizations/sessions/protecting-frontend-routes.mdx @@ -65,7 +65,7 @@ class App extends React.Component { ## Optional session on a route -The `` component passes the session context to all components using which you can check if a session exists. +You can provide the `requireAuth={false}` prop when using `` as shown below: ```tsx import React from "react"; @@ -84,7 +84,11 @@ class App extends React.Component { + // highlight-start + + // highlight-end + + } /> diff --git a/v2/session/common-customizations/sessions/protecting-frontend-routes.mdx b/v2/session/common-customizations/sessions/protecting-frontend-routes.mdx index 4b33c7f0f..8927f78de 100644 --- a/v2/session/common-customizations/sessions/protecting-frontend-routes.mdx +++ b/v2/session/common-customizations/sessions/protecting-frontend-routes.mdx @@ -65,7 +65,7 @@ class App extends React.Component { ## Optional session on a route -The `` component passes the session context to all components using which you can check if a session exists. +You can provide the `requireAuth={false}` prop when using `` as shown below: ```tsx import React from "react"; @@ -84,7 +84,11 @@ class App extends React.Component { + // highlight-start + + // highlight-end + + } /> diff --git a/v2/thirdparty/common-customizations/sessions/protecting-frontend-routes.mdx b/v2/thirdparty/common-customizations/sessions/protecting-frontend-routes.mdx index 4b33c7f0f..8927f78de 100644 --- a/v2/thirdparty/common-customizations/sessions/protecting-frontend-routes.mdx +++ b/v2/thirdparty/common-customizations/sessions/protecting-frontend-routes.mdx @@ -65,7 +65,7 @@ class App extends React.Component { ## Optional session on a route -The `` component passes the session context to all components using which you can check if a session exists. +You can provide the `requireAuth={false}` prop when using `` as shown below: ```tsx import React from "react"; @@ -84,7 +84,11 @@ class App extends React.Component { + // highlight-start + + // highlight-end + + } /> diff --git a/v2/thirdpartyemailpassword/common-customizations/sessions/protecting-frontend-routes.mdx b/v2/thirdpartyemailpassword/common-customizations/sessions/protecting-frontend-routes.mdx index 4b33c7f0f..8927f78de 100644 --- a/v2/thirdpartyemailpassword/common-customizations/sessions/protecting-frontend-routes.mdx +++ b/v2/thirdpartyemailpassword/common-customizations/sessions/protecting-frontend-routes.mdx @@ -65,7 +65,7 @@ class App extends React.Component { ## Optional session on a route -The `` component passes the session context to all components using which you can check if a session exists. +You can provide the `requireAuth={false}` prop when using `` as shown below: ```tsx import React from "react"; @@ -84,7 +84,11 @@ class App extends React.Component { + // highlight-start + + // highlight-end + + } /> diff --git a/v2/thirdpartypasswordless/common-customizations/sessions/protecting-frontend-routes.mdx b/v2/thirdpartypasswordless/common-customizations/sessions/protecting-frontend-routes.mdx index 4b33c7f0f..8927f78de 100644 --- a/v2/thirdpartypasswordless/common-customizations/sessions/protecting-frontend-routes.mdx +++ b/v2/thirdpartypasswordless/common-customizations/sessions/protecting-frontend-routes.mdx @@ -65,7 +65,7 @@ class App extends React.Component { ## Optional session on a route -The `` component passes the session context to all components using which you can check if a session exists. +You can provide the `requireAuth={false}` prop when using `` as shown below: ```tsx import React from "react"; @@ -84,7 +84,11 @@ class App extends React.Component { + // highlight-start + + // highlight-end + + } />