post-login redirect-with-actions doesn't work, please tell me how to execute this correctly.

With reference to this, we are implementing an implementation that redirects to another server at login and performs additional login processing.
I was able to pass user information and redirect with api.redirect.sendUserTo,
When I redirect to Auth0 Application again with https: // YOUR_DOMAIN / continue? State = THE_ORIGINAL_STATE, I get an Unauthorized error with Request failed with status code 401.

YOUR_DOMAIN → Domain automatically generated by Auth0 applications
THE_ORIGINAL_STATE → value of state parameter automatically assigned when redirecting api.redirect.sendUserTo

I tried both the GET and POST methods, but the redirection didn’t work.

Is there anything wrong with it, and I would like to know what to do in order for the redirection to take place and authentication to complete successfully.
Also, shouldn’t I return any response when redirecting to my server by api.redirect.sendUserTo, or should I redirect at https: // YOUR_DOMAIN / continue without worrying about it?

Hi @endo,

Welcome to the Community!

Can you post the entire error? There should be a more detailed message that will help us understand why the request is unauthorized.

thanks to reply, dan!

entire error is below.

{
  "message":"Request failed with status code 401",
  "name":"Error",
  "stack":"
    Error: Request failed with status code 401
    at createError (/var/task/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/var/task/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/var/task/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (events.js:388:22)
    at endReadableNT (internal/streams/readable.js:1336:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
  ",
  "config":{
    "url":"https://my-app.jp.auth0.com/continue",
    "method":"post",
    "data":"{
      "isSuccess":false,
      "token":"${JWT token}",
      "state":"hKFo2SBXZkJzeWlha0YwMk1YNGROVDF5Mk9neC1GZXF1ZjVNNKFuqHJlZGlyZWN0o3RpZNkgMkw4cS1ra2QtcjFnczAtRjJtWm0tc3pELXh4NEQ2REGjY2lk2SBoTXJURXloWFJQN1dLZ3puYllsbUU3elUyVFkzdEZ1NQ",
      "headers":{
        "Accept":"application/json, text/plain, */*",
        "Content-Type":"application/json",
        "x-hasura-admin-secret":"${hasura secret}",
        "User-Agent":"axios/0.21.1",
        "Content-Length":687
      },
      "params":{
        "state":"hKFo2SBXZkJzeWlha0YwMk1YNGROVDF5Mk9neC1GZXF1ZjVNNKFuqHJlZGlyZWN0o3RpZNkgMkw4cS1ra2QtcjFnczAtRjJtWm0tc3pELXh4NEQ2REGjY2lk2SBoTXJURXloWFJQN1dLZ3puYllsbUU3elUyVFkzdEZ1NQ"
      },
      "transformRequest":[null],
      "transformResponse":[null],
      "timeout":0,
      "xsrfCookieName":"XSRF-TOKEN",
      "xsrfHeaderName":"X-XSRF-TOKEN",
      "maxContentLength":-1,
      "maxBodyLength":-1
    }
  }
}

@endo,

Can you please also post the code you use to resume authentication (the redirect to the /continue endpoint)?