
Admin1.00572 (Customer) asked a question.
Hello,
I have an issue with my nodeJS API.
This API can validated an user's Okta Verify One Time code, as well as triggering and validating a Push notification for my users.
However, when I receive the Push notification, I cannot accept it from the smartphone taskbar : By clicking on the notification's details, I can see the device just displays Windows 10, and then "Not recognized".
I tried to use fingerprint and deviceToken, but the result is always the same : The device is not recognized.
Probably I am missing another information to setup from the POST request headers, but which one ?
const userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36';
const res2 = await axios.post(
pushHref,
{
stateToken: stateToken,
},
{
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'User-Agent': userAgent,
'X-Forwarded-For': userIP,
},
}
);
Thank you in advance for your help !
Adrien

PS : I can still accept the notification once I click on "examine", but would be better if I could accept it directly from the taskbar.
Hello @Admin1.00572 (Customer) Thank you for reacting out to our Community!
When you issue the challenge you need to make sure these values are sent as well:
The client IP Address and User Agent of the HTTP request is automatically captured and sent in the push notification as additional context.
You should always send a valid User-Agent HTTP header when verifying a push Factor.
The public IP address of your application must be allowed as a gateway IP address to forward the user agent's original IP address with the X-Forwarded-For HTTP header.
You can verify the API call you are making on your end with our example below:
https://developer.okta.com/docs/reference/api/factors/#request-example-37
Our Push factor doc can be reviewed here:
https://developer.okta.com/docs/reference/api/factors/#issue-a-push-factor-challenge
Community members help others by clicking Like or Select as Best on responses. Try it today.
Okta Identity Engine (OIE) Ask Me Anything: Get answers from product experts by clicking here.