awslabs / cognito-at-edge

Serverless authentication solution to protect your website or Amplify application
Apache License 2.0
168 stars 54 forks source link

Refresh functionality should not redirect on SPA applications #76

Open adrijardi opened 10 months ago

adrijardi commented 10 months ago

What would you like to be added:

I am writing an SPA application and it is my understanding that the refresh token functionality should not redirect and should instead return new cookies with a 200 response or an error.

Why is this needed:

SPA applications usually would like to handle refreshing tokens without redirection and, in case of failure display a message before redirecting.

Does this make sense, I am willing to contribute.

Thanks!