Hi there. I’m working with a react front end application using the Universal Login. I have a use case that requires me to show some messaging on the login/signup form depending on the guarded route that was chosen. So far all attempts at getting the data into the liquid template have failed. Should I avoid liquid templates all together? Do i need to revert to embedded login to get the interaction i require?
I configured my route:
<Route
path="/dashboard"
element={
<AuthenticationBoundary component={Dashboard} args={{
loginOptions: {
appState: {
'testing123': 'foo',
'ext-something': 'hello'
}
}
}}/>
}
/>
My authentication boundary
type RequireAuthProps = RootProps & {
component: React.ComponentType<object>;
args?: WithAuthenticationRequiredOptions;
};
function AuthenticationBoundary({
component,
args,
}: RequireAuthProps): JSX.Element {
const Component = withAuthenticationRequired(component, args);
return <Component />;
}
export default AuthenticationBoundary;
And the auth0 provider code:
return (
<Auth0Provider
domain={Tenant}
clientId={ClientID}
authorizationParams={{
redirect_uri: `${window.location.origin}${nextPage}`,
responseType: 'response_type',
forgotPasswordLink: 'uri',
'ext-randomText': 'Hello there',
}}
cacheLocation="localstorage"
onRedirectCallback={onRedirectCallback}
>
{children}
</Auth0Provider>
);
The liquid template syntax (just to confirm the output… or lack there of):
<h1>{{ ext-sample | default: "Sample param not available"}}</h1>
<h1>{{ sample | default: "Sample param not available"}}</h1>
