SoftwareBrothers/adminjs-expressjs

Don't redirect using POST on login

bartekczyz opened this issue ยท 2 comments

PR: #35

Problem

Currently after POST on loginPath you're being redirected to either rootPath or redirectTo from session. The problem is, it uses 307 redirect which keeps the request method and form data.

In some circumstances (eg. using with nestjs) you might end up with redirecting to the rootPath AS a POST request, so you'll see the message that route POST ${rootPath} does not exist.

Solution

Redirect from POST loginPath using 302 status

๐ŸŽ‰ This issue has been resolved in version 3.1.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

๐ŸŽ‰ This issue has been resolved in version 3.1.0-alpha.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€