Files
bjoern-m 601ffaae92 Introduce Flowpilot - integration (#1532)
This pull request introduces the new Flowpilot system along with several new features and various improvements. The key enhancements include configurable authorization, registration, and profile flows, as well as the ability to enable and disable user identifiers (e.g., email addresses and usernames) and login methods.

---------

Co-authored-by: Frederic Jahn <frederic.jahn@hanko.io>
Co-authored-by: Lennart Fleischmann <lennart.fleischmann@hanko.io>
Co-authored-by: lfleischmann <67686424+lfleischmann@users.noreply.github.com>
Co-authored-by: merlindru <hello@merlindru.com>
2024-08-06 16:07:29 +02:00

23 lines
1.3 KiB
Go

package shared
import (
"github.com/teamhanko/hanko/backend/flowpilot"
"net/http"
)
var (
ErrorPasscodeInvalid = flowpilot.NewFlowError("passcode_invalid", "The passcode is invalid.", http.StatusBadRequest)
ErrorPasskeyInvalid = flowpilot.NewFlowError("passkey_invalid", "The passkey is invalid.", http.StatusUnauthorized)
ErrorPasscodeMaxAttemptsReached = flowpilot.NewFlowError("passcode_max_attempts_reached", "The passcode was entered wrong too many times.", http.StatusUnauthorized)
ErrorRateLimitExceeded = flowpilot.NewFlowError("rate_limit_exceeded", "The rate limit has been exceeded.", http.StatusTooManyRequests)
ErrorNotFound = flowpilot.NewFlowError("not_found", "The requested resource was not found.", http.StatusNotFound)
ErrorUnauthorized = flowpilot.NewFlowError("unauthorized", "The session is invalid.", http.StatusUnauthorized)
)
var (
ErrorEmailAlreadyExists = flowpilot.NewInputError("email_already_exists", "The email address already exists.")
ErrorUsernameAlreadyExists = flowpilot.NewInputError("username_already_exists", "The username already exists.")
ErrorUnknownUsername = flowpilot.NewInputError("unknown_username_error", "The username is unknown.")
ErrorInvalidUsername = flowpilot.NewInputError("invalid_username_error", "The username is invalid.")
)