0

I'm trying to add authentication for the nuxt application through IDP federation with azure AD. basically nuxt auth calls to Azure B2C tenant and it federate to the Azure AD.

The process as follows.

Nuxt Auth -> Azure B2C -> Azure AD (Federated IDP)

Azure AD returns the token as the result of federation.

Azure B2C add that token to the ID token under the key idp_access_token. Then Nuxt auth get the token and use it for authentication.

But after successful login it expect to redirect to the /home page.

redirect: {
      login: "/",
      callback: "/",
      home: "/home"
    }, 

while it redirect it shows the 431 error. The reason for that is large cookie that contains

access token, refresh token

Instead of redirect to the given home page it gives an error like following screenshot shows.

enter image description here

error shows like follows.

enter image description here

is there any way to solve this issue?

I upgraded node version from 12 to 15, deleted browser cache and cookies. But issue is still there.

  • Have you tried to use the command '--max-http-header-size' to change the max size of header? I think we need to focus on the 431 error itselt. And I found an answer from [here](https://stackoverflow.com/a/56351573). – tiny-wa Mar 03 '21 at 07:55
  • @Tiny-wa with this command it worked. previously i tried as well. I think i missed something. This time it worked. Thank you for the reply! – Buddhika Priyabhashana Mar 04 '21 at 05:53
  • Congratulations! I added the command as the answer so that it may help others, thanks a lot for your response! – tiny-wa Mar 04 '21 at 05:58

1 Answers1

1

For 431 error code, we need to change the max size of http request header, use command

--max-http-header-size

and here's an answer related.

tiny-wa
  • 1,551
  • 1
  • 3
  • 10