I was searching how to pass data or query to pre registration flow, but i found another topic talking about it: Accessing Query String Parameters in a Pre-User Registration Action
The way i found to do that is using:
loginWithRedirect({
redirectUri: callbackUri,
scope: 'openid profile email custom:meta',
})
So, i can access the array in event.transaction.requested_scopes
and do something based on that.
Documentation ref:
But probabily is not the best approach.
Can someone guide me, if is possible to pass a object or string custom to this flow?
Hi @alexandro.oliveira , welcome to Auth0!
This approach is valid and documented.
scope
and the corresponding requested_scopes
is a standard param.
The doc (Accessing Query String Parameters in a Pre-User Registration Action) refers to additional key:value query parameters added to the /authorize request.
For reference, to see what I mean by additional key:value query parameters, please take a look at this topic: Oauth/token request payload custom key/values
Please let me know if we can answer any other questions on this topic!
1 Like
From what I understood, indeed, apart from the scope
, it is not possible to pass dynamic objects or strings to the pre-registration, right?
And regarding being documented
, does that mean this approach is recommended for this case?
Hi @alexandro.oliveira , I updated the link to the ref topic in my last replay.
That’s right. In the pre-user-registration flow, you can reference to the request context data listed here: Actions Triggers: pre-user-registration - Event Object
The requested_scopes is one of the supported methods and it can be used in the flow.
Ok, for this topic, this is enough.
Thanks for supporting me.
2 Likes
system
Closed
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.