NextJS + Samlify (Route Handler Request Object Extended Issue) #59681
Unanswered
boncz92
asked this question in
App Router
Replies: 2 comments
-
Currently facing the same issue, I think it's with how the request is being passed to parseLoginResponse. Wondering if you ended up solving it |
Beta Was this translation helpful? Give feedback.
0 replies
-
I managed to solve this by using the formData API.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When im attempting to migrate from nextjs page router to the app router im encountering an error. It seems that the error is being caused by the change in how the 'request' object is handled prior to getting ahold of it. The first example returns parsed results as expected while the second example returns an error:
' TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined'
This is obviously a way in which samlify is handling the parsing of the request object passed to it (There isnt an option to just pass it the 'samlResponse') it expects a normally structured unaltered response object passed to it. Is there a way to retreive the raw request without the extended functionality of NextRequest? If not anyone have any ideas how I would go about resolving this? (Examples have been validated and the first example 100% validates and outputs the parsedResults)
/pages/api/auth/samlAuth.js
/app/api/samlAuth/route.js
Beta Was this translation helpful? Give feedback.
All reactions