Serverless http api is not receiving user information in redirect callback

I created an Okta application(oidc–> Web Application) that is redirecting
redirect URIs

Created a serverless HTTP API to listen to the callback something like below:

      handler: src/handler.auth
        - http:
            path: authorization-code/callback/
            method: get


module.exports.auth = async (event, context, callback) => {
  const userinfo = event.userContext && event.userContext.userinfo; // not getting this userinfo here
  const response = {
    statusCode: 301,
    headers: {
      Location: "rediretion url",
    body: userinfo
  callback(null, response);

I am expecting this /authorization-code/callback should return user information to me.

My findings I checked in node js express API provided into a doc is working fine for me.

app.get('/', (req, res) => {
  if (req.userContext.userinfo) {
    res.send(`Hi ${}!`);
  } else {
    res.send('Please Sign In');

But my business need is to handle in serverless only.

Any help will unblock me to proceed with the task.