Can I wrap my whole React app in `<ThirdPartyEmail...
# support-questions
a
Can I wrap my whole React app in
<ThirdPartyEmailPasswordAuth> ... </ThirdPartyEmailPasswordAuth>
while still requiring auth in some place and not others?
r
Hey @Artyom
a
My usecase is that I want to access session info in a bunch of places, but when I wrap a component in
<ThirdPartyEmailPasswordAuth> ... </ThirdPartyEmailPasswordAuth>
, it almost always means I have to create a sub-component and it adds boilerplate
r
We plan on making this possible. But for now, it’s not advisable cause if you use wrap even our pre built UI around this, it will cause an infinite loop when visiting the email verification screen.
a
Ok noted
r
But if you do not wrap our pre built around this, you can wrap all the other routes with it and provide the requireAuth=false prop to it.
And then routes that do require auth cause use this wrapper again without the requireAuth prop and it will all work
a
Aha, okay, good to know
Thanks
r
Finally, the other limitation this has now is that it won’t work with server side rendering. Again, we are working on solving that too.
a
Is there a GH issue I can subscribe to re/ wrapping the whole app?
a
Thanks, subscribed!