Send custom params from auth0-spa-js loginWithRedirect() for using in rules

Dear Community,

I’m developing reactJS app using auth0-spa-js. I want to pass custom params through the loginWithRedirect() function and use same in rules to implement some custom logic.

roleID uuid
venue uuid

Which SDK this is regarding: auth0-spa-js

Is this the right format to do so?

in auth0-spa-js
<Button type=‘primary’ onClick={() => loginWithRedirect([‘passID’ : passID, ‘venue’ :venue ])}> Log In

in Rules
const [passID, venue] = JSON.Parse(context.request.query)

Hi @pratikpalse,

Welcome to the Community!

You need to pass an object. ({}) to the loginWithRedirect() method. You are currently passing an array ([]).

For example:


Okay got it. Please confirm how to use these params inside Rules.

They are available in context.request.query.

Have you tried it?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.