Thanks for the update!
What I am noticing in the provided information, it appears that the protocol you are using for the transaction is oauth2-password and not oidc-basic-profile. This would indicate that by the time that the transaction reaches the PostLogin Action, it is considered a new login process which does not include the initial authParams which you have provided to the /passwordless/start endpoint.
If you are making a POST to the /oauth/token endpoint, you might need to specify that you are using the oauth/grant-type/passwordless/otp grant type. To provide you more insight, a typical flow would be:
- The initial POST to the
/passwordless/start endpoint
{
"client_id": "...",
"connection": "sms",
"phone_number": "...",
"send": "code",
"authParams": {
"nonce": "123456654321223455"
}
}
- Post Request to the
/oauth/token endpoint
{
"grant_type": "http://auth0.com/oauth/grant-type/passwordless/otp",
"client_id": "...",
"client_secret": "...",
"username": "THE_PHONE_NUMBER",
"otp": "THE_USER_ENTERED_CODE",
"realm": "sms"
}
The authParams object from /passwordless/start is specifically tied to the passwordless authentication pipeline. When you exchange the OTP for tokens, you must use a grant_type that tells Auth0 to look for that pending passwordless transaction.
If you use a different grant_type , like password , Auth0 treats it as a completely new login attempt via the ROPG flow, which has no knowledge of the preceding /passwordless/start call or its authParams .
The most likely cause is that your /oauth/token request is using grant_type: 'password' instead of the correct grant type for this flow.
Please let me know if this fixes your issue. If not, could you share how exactly are you making these calls and what does the flow look like?
Kind Regards,
Nik